-
Notifications
You must be signed in to change notification settings - Fork 18
76 lines (62 loc) · 1.9 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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14
- id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
# Runs a single command using the runners shell
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install deps
run: forge install
# This is required separately from yarn test because it generates the typechain definitions
- name: Compile
run: yarn compile
- name: Run unit tests
run: yarn test
env:
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
test:
name: Foundry Unit Tests
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-node@v2
- name: Install dev dependencies
run: yarn install
# Runs a single command using the runners shell
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install deps
run: forge install
- name: Run tests
run: OUTPUT_FILENAME=Optimism.json CONSTANTS_FILENAME=Optimism.json forge test -vvv
env:
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
PRIVATE_KEY_DEPLOY: ${{ secrets.PRIVATE_KEY_DEPLOY }}