-
Notifications
You must be signed in to change notification settings - Fork 10
93 lines (89 loc) · 2.74 KB
/
main.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
85
86
87
88
89
90
91
92
93
name: Continuous Build
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- production
- dev
- rebrand
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- name: Clone api3-dao-dashboard
uses: actions/checkout@master
- name: Check hyperlinks
uses: gaurav-nelson/github-action-markdown-link-check@v1
lint-test:
runs-on: ubuntu-latest
steps:
- name: Clone api3-dao-dashboard
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Compile
run: yarn tsc
- name: Test
run: yarn test
cypress:
runs-on: ubuntu-latest
steps:
- name: Clone api3-dao-dashboard
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Cache node modules
uses: actions/cache@v3
id: node-modules-cache
with:
path: |
node_modules
*/*/node_modules
key: modules-${{ hashFiles('**/yarn.lock') }}
- name: Cache cypress
id: cypress-cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-cypress-${{ hashFiles('**/yarn.lock') }}
path: ~/.cache/Cypress
restore-keys: ${{ runner.os }}-cypress-
- name: Install Dependencies
# We add the additional cypress install to handle the common Missing Binary issue: https://docs.cypress.io/guides/continuous-integration/introduction#Missing-binary
run: |
yarn install --frozen-lockfile
yarn cypress install
- name: Increase file watcher limit
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Prepare DAO contracts
run: yarn eth:prepare-dao-contracts-for-hardhat --github-actions
- name: Bootstrap DAO contracts
run: cd dao-contracts && yarn bootstrap
- name: Cypress tests
env:
REACT_APP_NODE_ENV: development
REACT_APP_PROJECT_ID: e7e6e90622ec8e65c4d02e829a68529a
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
REACT_APP_MAINNET_PROVIDER_URL: ${{ secrets.REACT_APP_MAINNET_PROVIDER_URL }}
run: yarn percy exec -- -- yarn ci:cypress
timeout-minutes: 60
- name: Store artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-artifacts
path: cypress/screenshots
if-no-files-found: ignore