-
Notifications
You must be signed in to change notification settings - Fork 63
47 lines (44 loc) · 1.34 KB
/
build.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
name: Build
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
build:
name: Build subgraphs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- name: Set npm cache directory
run: npm config set cache .npm-cache --global
continue-on-error: true
- name: Cache node modules
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # pin@v2
with:
path: |
.npm-cache
node_modules
key: ${{ runner.os }}-alpine-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-alpine-node-
continue-on-error: true
# issue with github actions, see https://github.com/actions/setup-node/issues/214#issuecomment-810829250
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- run: npm ci
- name: build
run: |
node scripts/deploy.js --build-only -s main -n mainnet
# lint happens after build because it depends on some of the codegen
- run: npm run lint