-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (44 loc) · 1.49 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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