-
Notifications
You must be signed in to change notification settings - Fork 9
53 lines (49 loc) · 1.61 KB
/
ci.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
48
49
50
51
52
53
name: Continuous Integration
on: [push, pull_request]
jobs:
compile:
runs-on: ubuntu-latest
name: Compile
strategy:
matrix:
value:
[
'bonds',
'carbonmark',
'protocol-metrics',
'vesting',
'user-carbon',
'pairs',
'celo-bridged-carbon',
'ethereum-bridged-carbon',
'polygon-bridged-carbon',
'polygon-digital-carbon',
]
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: yarn --immutable
working-directory: '${{ matrix.value }}'
# Generate code and check for uncommitted changes
# https://github.com/marketplace/actions/check-uncommitted-changes
- name: Generate Subgraph Code
run: npm run codegen
working-directory: '${{ matrix.value }}'
- name: Check for uncommitted changes
id: check-changes
uses: mskri/check-uncommitted-changes-action@v1.0.1
- name: Evaluate if there are changes
if: steps.check-changes.outputs.outcome == failure()
run: echo "There are uncommitted changes - execute 'npm run codegen' locally and commit the generated files!"
- name: Build Subgraph
run: npm run build
working-directory: '${{ matrix.value }}'
- name: Run Tests
if: matrix.value == 'polygon-digital-carbon'
run: npm run test
working-directory: "${{ matrix.value }}"