|
| 1 | +## Github workflow to run p2p tests |
| 2 | + |
| 3 | +name: Tests::P2P |
| 4 | + |
| 5 | +on: |
| 6 | + workflow_call: |
| 7 | + |
| 8 | +## env vars are transferred to composite action steps |
| 9 | +env: |
| 10 | + BITCOIND_TEST: 0 |
| 11 | + RUST_BACKTRACE: full |
| 12 | + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 15 |
| 13 | + TEST_TIMEOUT: 30 |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: stackslib-tests-${{ github.head_ref || github.ref || github.run_id}} |
| 17 | + ## Only cancel in progress if this is for a PR |
| 18 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 19 | + |
| 20 | +jobs: |
| 21 | + # p2p integration tests with code coverage |
| 22 | + integration-tests: |
| 23 | + name: Integration Tests |
| 24 | + runs-on: ubuntu-latest |
| 25 | + strategy: |
| 26 | + ## Continue with the test matrix even if we've had a failure |
| 27 | + fail-fast: false |
| 28 | + ## Run a maximum of 32 concurrent tests from the test matrix |
| 29 | + max-parallel: 32 |
| 30 | + matrix: |
| 31 | + test-name: |
| 32 | + - net::tests::convergence::test_walk_ring_allow_15 |
| 33 | + - net::tests::convergence::test_walk_ring_15_plain |
| 34 | + - net::tests::convergence::test_walk_ring_15_pingback |
| 35 | + - net::tests::convergence::test_walk_ring_15_org_biased |
| 36 | + - net::tests::convergence::test_walk_line_allowed_15 |
| 37 | + - net::tests::convergence::test_walk_line_15_plain |
| 38 | + - net::tests::convergence::test_walk_line_15_org_biased |
| 39 | + - net::tests::convergence::test_walk_line_15_pingback |
| 40 | + - net::tests::convergence::test_walk_star_allowed_15 |
| 41 | + - net::tests::convergence::test_walk_star_15_plain |
| 42 | + - net::tests::convergence::test_walk_star_15_pingback |
| 43 | + - net::tests::convergence::test_walk_star_15_org_biased |
| 44 | + - net::tests::convergence::test_walk_inbound_line_15 |
| 45 | + steps: |
| 46 | + ## Setup test environment |
| 47 | + - name: Setup Test Environment |
| 48 | + id: setup_tests |
| 49 | + uses: stacks-network/actions/stacks-core/testenv@main |
| 50 | + with: |
| 51 | + btc-version: "25.0" |
| 52 | + |
| 53 | + ## Increase open file descriptors limit |
| 54 | + - name: Increase Open File Descriptors |
| 55 | + run: | |
| 56 | + sudo prlimit --nofile=4096:4096 |
| 57 | +
|
| 58 | + ## Run test matrix using restored cache of archive file |
| 59 | + ## - Test will timeout after env.TEST_TIMEOUT minutes |
| 60 | + - name: Run Tests |
| 61 | + id: run_tests |
| 62 | + timeout-minutes: ${{ fromJSON(env.TEST_TIMEOUT) }} |
| 63 | + uses: stacks-network/actions/stacks-core/run-tests@main |
| 64 | + with: |
| 65 | + test-name: ${{ matrix.test-name }} |
| 66 | + threads: 1 |
| 67 | + |
| 68 | + ## Create and upload code coverage file |
| 69 | + - name: Code Coverage |
| 70 | + id: codecov |
| 71 | + uses: stacks-network/actions/codecov@main |
| 72 | + with: |
| 73 | + test-name: ${{ matrix.test-name }} |
| 74 | + |
| 75 | + check-tests: |
| 76 | + name: Check Tests |
| 77 | + runs-on: ubuntu-latest |
| 78 | + if: always() |
| 79 | + needs: |
| 80 | + - integration-tests |
| 81 | + steps: |
| 82 | + - name: Check Tests Status |
| 83 | + id: check_tests_status |
| 84 | + uses: stacks-network/actions/check-jobs-status@main |
| 85 | + with: |
| 86 | + jobs: ${{ toJson(needs) }} |
| 87 | + summary_print: "true" |
0 commit comments