-
Notifications
You must be signed in to change notification settings - Fork 13
84 lines (69 loc) · 2 KB
/
test-check.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: run-test-suite
on:
push:
branches: [ 'main' ]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [ '**' ]
paths-ignore:
- 'README.md'
workflow_dispatch:
jobs:
# sets up build artifacts for other jobs to use
setup-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.15.0]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --production=false
- name: clean
run: yarn clean
- name: Compile @webb-tools/contracts
run: lerna run compile --scope=@webb-tools/contracts
- name: Build packages
run: lerna run build
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: |
packages/**/dist
!packages/**/node_modules
test:
needs: setup-build
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main' && github.event.pull_request.draft == false
strategy:
matrix:
node-version: [18.15.0]
steps:
- uses: actions/checkout@v3
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: build-artifacts
path: packages
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup DVC
uses: iterative/setup-dvc@v1
- name: Fetch submodules
run: git submodule update --init --recursive
- name: Install dependencies
run: yarn install --production=false
- name: Populate fixtures
run: yarn fetch:fixtures
- name: Run test suite
env:
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
run: yarn test