|
| 1 | +name: Integration Tests |
| 2 | + |
| 3 | +# Controls when the action will run. |
| 4 | +on: |
| 5 | + # Triggers the workflow on push or pull request events but only for the master branch |
| 6 | + push: |
| 7 | + branches: [main] |
| 8 | + pull_request: |
| 9 | + branches: [main] |
| 10 | + |
| 11 | + # Allows you to run this workflow manually from the Actions tab |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +# Cancel previous runs |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +# Parity CI image to use |
| 20 | +# Common variable is defined in the workflow |
| 21 | +# Repo env variable doesn't work for PRs from forks |
| 22 | +env: |
| 23 | + CI_IMAGE: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050" |
| 24 | + NODE_VERSION: 22 |
| 25 | + |
| 26 | +jobs: |
| 27 | + set-image: |
| 28 | + # This workaround sets the container image for each job using 'set-image' job output. |
| 29 | + # env variables don't work for PRs from forks, so we need to use outputs. |
| 30 | + runs-on: ubuntu-latest |
| 31 | + outputs: |
| 32 | + CI_IMAGE: ${{ steps.set_image.outputs.CI_IMAGE }} |
| 33 | + steps: |
| 34 | + - id: set_image |
| 35 | + run: echo "CI_IMAGE=${{ env.CI_IMAGE }}" >> $GITHUB_OUTPUT |
| 36 | + |
| 37 | + integration-tests: |
| 38 | + name: Integration Tests |
| 39 | + runs-on: parity-default |
| 40 | + timeout-minutes: 60 |
| 41 | + needs: [ set-image ] |
| 42 | + container: |
| 43 | + image: ${{ needs.set-image.outputs.CI_IMAGE }} |
| 44 | + |
| 45 | + steps: |
| 46 | + - name: Checkout sources |
| 47 | + uses: actions/checkout@v4 |
| 48 | + |
| 49 | + - name: Rust cache |
| 50 | + uses: Swatinem/rust-cache@v2 |
| 51 | + with: |
| 52 | + cache-on-failure: true |
| 53 | + cache-all-crates: true |
| 54 | + |
| 55 | + - name: Setup Node.js |
| 56 | + uses: actions/setup-node@v4 |
| 57 | + with: |
| 58 | + node-version: ${{ env.NODE_VERSION }} |
| 59 | + cache: 'npm' |
| 60 | + cache-dependency-path: examples/package.json |
| 61 | + |
| 62 | + - name: Install just |
| 63 | + run: cargo install just --locked || true |
| 64 | + |
| 65 | + - name: Download zombienet |
| 66 | + run: | |
| 67 | + curl -L \ |
| 68 | + -H "Authorization: token ${{ github.token }}" \ |
| 69 | + -o zombienet-linux-x64 \ |
| 70 | + "https://github.com/paritytech/zombienet/releases/download/v1.3.138/zombienet-linux-x64" |
| 71 | + chmod +x zombienet-linux-x64 |
| 72 | + echo "ZOMBIENET_BINARY=$GITHUB_WORKSPACE/zombienet-linux-x64" >> $GITHUB_ENV |
| 73 | +
|
| 74 | + - name: Run authorize and store (PAPI, smoldot) |
| 75 | + working-directory: examples |
| 76 | + run: just run-authorize-and-store "smoldot" |
| 77 | + |
| 78 | + - name: Run authorize and store (PAPI, RPC node) |
| 79 | + working-directory: examples |
| 80 | + run: just run-authorize-and-store "ws" |
0 commit comments