mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-11 03:09:41 +08:00
Some checks are pending
CodeQL / codeql (push) Waiting to run
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
* feat(libp2p): enable shared TCP listeners * docs: switch mentions of /ws to /tcp/4001 * feat: AutoTLS.AutoWSS This adds AutoTLS.AutoWSS flag that is set to true by default. It will check if Addresses.Swarm contain explicit /ws listener, and if not found, it will append one per every /tcp listener This way existing TCP ports are reused without any extra configuration, but we don't break user's who have custom / explicit /ws listener already. I also moved logger around, to include Addresses.Swarm inspection results in `autotls` logger. * chore: go-libp2p v0.38.1 https://github.com/libp2p/go-libp2p/releases/tag/v0.38.0 https://github.com/libp2p/go-libp2p/releases/tag/v0.38.1 * docs: AutoTLS.AutoWSS and go-libp2p v0.38.x * chore: p2p-forge/client v0.2.0 https://github.com/ipshipyard/p2p-forge/releases/tag/v0.2.0 * fix: disable libp2p.ShareTCPListener() in PNET * chore(ci): timeout sharness after 15m average successful run is <9 minutes, no need to wait for 20 https://github.com/ipfs/kubo/actions/workflows/sharness.yml?query=is%3Asuccess --------- Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org>
124 lines
4.9 KiB
YAML
124 lines
4.9 KiB
YAML
name: Sharness
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
sharness-test:
|
|
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "4xlarge"]' || '"ubuntu-latest"') }}
|
|
timeout-minutes: ${{ github.repository == 'ipfs/kubo' && 15 || 60 }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Checkout Kubo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: kubo
|
|
- name: Install missing tools
|
|
run: sudo apt update && sudo apt install -y socat net-tools fish libxml2-utils
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: test/sharness/lib/dependencies
|
|
key: ${{ runner.os }}-test-generate-junit-html-${{ hashFiles('test/sharness/lib/test-generate-junit-html.sh') }}
|
|
- name: Run Sharness tests
|
|
run: |
|
|
make -O -j "$PARALLEL" \
|
|
test_sharness \
|
|
coverage/sharness_tests.coverprofile \
|
|
test/sharness/test-results/sharness.xml
|
|
working-directory: kubo
|
|
env:
|
|
TEST_DOCKER: 1
|
|
TEST_PLUGIN: 0
|
|
TEST_FUSE: 0
|
|
TEST_VERBOSE: 1
|
|
TEST_JUNIT: 1
|
|
TEST_EXPENSIVE: 1
|
|
IPFS_CHECK_RCMGR_DEFAULTS: 1
|
|
CONTINUE_ON_S_FAILURE: 1
|
|
# increasing parallelism beyond 10 doesn't speed up the tests much
|
|
PARALLEL: ${{ github.repository == 'ipfs/kubo' && 10 || 3 }}
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
|
|
if: failure() || success()
|
|
with:
|
|
name: sharness
|
|
files: kubo/coverage/sharness_tests.coverprofile
|
|
- name: Aggregate results
|
|
run: find kubo/test/sharness/test-results -name 't*-*.sh.*.counts' | kubo/test/sharness/lib/sharness/aggregate-results.sh > kubo/test/sharness/test-results/summary.txt
|
|
- name: 👉️ If this step failed, go to «Summary» (top left) → «HTML Report» → inspect the «Failures» column
|
|
run: |
|
|
cat kubo/test/sharness/test-results/summary.txt &&
|
|
grep 'failed\s*0' kubo/test/sharness/test-results/summary.txt
|
|
- name: Add aggregate results to the summary
|
|
if: failure() || success()
|
|
run: |
|
|
echo "# Summary" >> $GITHUB_STEP_SUMMARY
|
|
echo >> $GITHUB_STEP_SUMMARY
|
|
cat kubo/test/sharness/test-results/summary.txt >> $GITHUB_STEP_SUMMARY
|
|
- name: Generate one-page HTML report
|
|
uses: ipdxco/junit-xml-to-html@v1
|
|
if: failure() || success()
|
|
with:
|
|
mode: no-frames
|
|
input: kubo/test/sharness/test-results/sharness.xml
|
|
output: kubo/test/sharness/test-results/sharness.html
|
|
- name: Upload one-page HTML report to S3
|
|
id: one-page
|
|
uses: ipdxco/custom-github-runners/.github/actions/upload-artifact@main
|
|
if: github.repository == 'ipfs/kubo' && (failure() || success())
|
|
with:
|
|
source: kubo/test/sharness/test-results/sharness.html
|
|
destination: sharness.html
|
|
- name: Upload one-page HTML report
|
|
if: github.repository != 'ipfs/kubo' && (failure() || success())
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sharness.html
|
|
path: kubo/test/sharness/test-results/sharness.html
|
|
- name: Generate full HTML report
|
|
uses: ipdxco/junit-xml-to-html@v1
|
|
if: failure() || success()
|
|
with:
|
|
mode: frames
|
|
input: kubo/test/sharness/test-results/sharness.xml
|
|
output: kubo/test/sharness/test-results/sharness-html
|
|
- name: Upload full HTML report to S3
|
|
id: full
|
|
uses: ipdxco/custom-github-runners/.github/actions/upload-artifact@main
|
|
if: github.repository == 'ipfs/kubo' && (failure() || success())
|
|
with:
|
|
source: kubo/test/sharness/test-results/sharness-html
|
|
destination: sharness-html/
|
|
- name: Upload full HTML report
|
|
if: github.repository != 'ipfs/kubo' && (failure() || success())
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sharness-html
|
|
path: kubo/test/sharness/test-results/sharness-html
|
|
- name: Add S3 links to the summary
|
|
if: github.repository == 'ipfs/kubo' && (failure() || success())
|
|
run: echo "$MD" >> $GITHUB_STEP_SUMMARY
|
|
env:
|
|
MD: |
|
|
# HTML Reports
|
|
|
|
- View the [one page HTML report](${{ steps.one-page.outputs.url }})
|
|
- View the [full HTML report](${{ steps.full.outputs.url }}index.html)
|