-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (72 loc) · 2.05 KB
/
testing.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Testing
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: nevermined-io/[email protected]
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
estuary: 'true'
contracts-version: 'v3.2.1'
- name: Install dependencies
run: |
yarn
- name: Run linters
run: yarn lint
- name: Check artifacts
run: |
nvm-tools copy-artifacts ./artifacts
nvm-tools copy-circuits ./circuits
ls -l artifacts
- name: Run integration tests
env:
SEED_WORDS: ${{ secrets.seedWords }}
INFURA_TOKEN: ${{ secrets.INFURA_TOKEN }}
IPFS_GATEWAY: https://ipfs.infura.io:5001
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
LOG_LEVEL: 1 # If LOG_LEVEL is >1 it will print the logger.debug calls
run: yarn run integration:cover
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: nevermined-io/contracts
ref: 'main'
path: contracts
token: ${{ secrets.API_TOKEN_GITHUB }}
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Deploy contracts
run: |
cd contracts
yarn
export TESTNET=true
export NETWORK=external
./scripts/build-circuit.sh
yarn deploy
mv artifacts ..
mv circuits ..
cd ..
rm -rf contracts
- name: Install dependencies
run: |
yarn
- name: Run linters
run: yarn lint
- name: Start ganache
run: yarn ganache --port 18545 --chain.chainId 8998 &
- name: Run unit tests
env:
ETH_PORT: 18545
run: |
yarn run test:cover