Skip to content

chore: add tests for Peregrine #8

chore: add tests for Peregrine

chore: add tests for Peregrine #8

Workflow file for this run

name: Lint and Test
on:
push:
branches:
- "main"
paths:
- "**.ts"
pull_request:
branches:
- "**"
jobs:
lint-and-test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Install minikube
uses: medyagh/[email protected]
- name: Download source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint
- name: Check dependency duplication
run: if ! yarn dedupe --check; then echo "::warning ::Dependencies may be deduplicated"; fi;
- name: Check versioning
run: yarn version check
- name: Set environment variables
run: cat ./tests/.env.test >> $GITHUB_ENV
- name: Spin up network (in the background)
run: yarn test:e2e:start-network > $GITHUB_OUTPUT &
id: zombienet_setup
# This is necessary since the `zombienet spawn` process never exits.
- name: Wait until nodes are reachable on their WS port
run: until (nc -w 3 127.0.0.1 ${{ env.RELAY_ALICE_RPC }} && nc -w 3 127.0.0.1 ${{ env.PROVIDER_ALICE_RPC }} && nc -w 3 127.0.0.1 ${{ env.CONSUMER_ALICE_RPC }}) ; do tail -n 50 ${{ steps.zombienet_setup.outputs.* }} && sleep 1; done
- name: Run integration tests
run: yarn test:e2e