This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
95 lines (76 loc) · 2.46 KB
/
tests.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
94
95
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache YARN dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- run: yarn --no-progress --non-interactive --frozen-lockfile
- run: yarn build
- run: REPORT_GAS=1 yarn test
- run: yarn codechecks # compares gas report
env: # Or as an environment variable
CC_SECRET: ${{ secrets.CC_SECRET }}
test-e2e:
name: Tests E2E
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache YARN dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Install Dependencies
run: yarn --no-progress --non-interactive --frozen-lockfile
- run: yarn build
- run: |
git clone https://github.com/ethereum-optimism/optimism.git
cd optimism
git checkout b9ee4fbbb5401a2f756821923e41ee1cee3698af
- name: Build the services
working-directory: ./optimism/ops
run: ./scripts/build-ci.sh
- name: Bring the stack up
working-directory: ./optimism/ops
run: |
./scripts/stats.sh &
docker-compose up -d
- name: Wait for the Sequencer node
working-directory: ./optimism/ops
run: ./scripts/wait-for-sequencer.sh
- name: Run e2e Tests
run: |
./.github/workflows/wait-for-it.sh -h localhost -p 8080 -t 120
sleep 60 # we still need to wait for contracts to be deployed really
yarn test-e2e