-
Notifications
You must be signed in to change notification settings - Fork 4
Added a github workflow for running examples as integration tests #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a501ae2
f2bbffe
38f8c7f
e730b91
8de6b15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,80 @@ | ||||||||||||||||
| name: Integration Tests | ||||||||||||||||
|
|
||||||||||||||||
| # Controls when the action will run. | ||||||||||||||||
| on: | ||||||||||||||||
| # Triggers the workflow on push or pull request events but only for the master branch | ||||||||||||||||
| push: | ||||||||||||||||
| branches: [main] | ||||||||||||||||
| pull_request: | ||||||||||||||||
| branches: [main] | ||||||||||||||||
|
|
||||||||||||||||
| # Allows you to run this workflow manually from the Actions tab | ||||||||||||||||
| workflow_dispatch: | ||||||||||||||||
|
|
||||||||||||||||
| # Cancel previous runs | ||||||||||||||||
| concurrency: | ||||||||||||||||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||
|
|
||||||||||||||||
| # Parity CI image to use | ||||||||||||||||
| # Common variable is defined in the workflow | ||||||||||||||||
| # Repo env variable doesn't work for PRs from forks | ||||||||||||||||
| env: | ||||||||||||||||
| CI_IMAGE: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050" | ||||||||||||||||
| NODE_VERSION: 22 | ||||||||||||||||
|
|
||||||||||||||||
| jobs: | ||||||||||||||||
| set-image: | ||||||||||||||||
| # This workaround sets the container image for each job using 'set-image' job output. | ||||||||||||||||
| # env variables don't work for PRs from forks, so we need to use outputs. | ||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||
| outputs: | ||||||||||||||||
| CI_IMAGE: ${{ steps.set_image.outputs.CI_IMAGE }} | ||||||||||||||||
| steps: | ||||||||||||||||
| - id: set_image | ||||||||||||||||
| run: echo "CI_IMAGE=${{ env.CI_IMAGE }}" >> $GITHUB_OUTPUT | ||||||||||||||||
|
|
||||||||||||||||
| integration-tests: | ||||||||||||||||
| name: Integration Tests | ||||||||||||||||
| runs-on: parity-default | ||||||||||||||||
| timeout-minutes: 60 | ||||||||||||||||
| needs: [ set-image ] | ||||||||||||||||
| container: | ||||||||||||||||
| image: ${{ needs.set-image.outputs.CI_IMAGE }} | ||||||||||||||||
|
|
||||||||||||||||
| steps: | ||||||||||||||||
| - name: Checkout sources | ||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Rust cache | ||||||||||||||||
| uses: Swatinem/rust-cache@v2 | ||||||||||||||||
| with: | ||||||||||||||||
| cache-on-failure: true | ||||||||||||||||
| cache-all-crates: true | ||||||||||||||||
|
|
||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||
| with: | ||||||||||||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||||||||||||
| cache: 'npm' | ||||||||||||||||
| cache-dependency-path: examples/package.json | ||||||||||||||||
|
|
||||||||||||||||
| - name: Install just | ||||||||||||||||
| run: cargo install just --locked || true | ||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
let's try this (when actual CI passes):
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mhm, the CI failed, docker is not installed.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
ehm, I enabled auto-merge and forgot to mark as required, |
||||||||||||||||
|
|
||||||||||||||||
| - name: Download zombienet | ||||||||||||||||
| run: | | ||||||||||||||||
| curl -L \ | ||||||||||||||||
| -H "Authorization: token ${{ github.token }}" \ | ||||||||||||||||
| -o zombienet-linux-x64 \ | ||||||||||||||||
| "https://github.com/paritytech/zombienet/releases/download/v1.3.138/zombienet-linux-x64" | ||||||||||||||||
| chmod +x zombienet-linux-x64 | ||||||||||||||||
| echo "ZOMBIENET_BINARY=$GITHUB_WORKSPACE/zombienet-linux-x64" >> $GITHUB_ENV | ||||||||||||||||
|
|
||||||||||||||||
| - name: Run authorize and store (PAPI, smoldot) | ||||||||||||||||
| working-directory: examples | ||||||||||||||||
| run: just run-authorize-and-store "smoldot" | ||||||||||||||||
|
|
||||||||||||||||
| - name: Run authorize and store (PAPI, RPC node) | ||||||||||||||||
| working-directory: examples | ||||||||||||||||
| run: just run-authorize-and-store "ws" | ||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.