-
Notifications
You must be signed in to change notification settings - Fork 10
83 lines (67 loc) · 1.88 KB
/
test_contracts.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
name: CI-Contracts
on:
pull_request:
branches:
- main
paths:
- "packages/protocol/**"
push:
branches:
- main
paths:
- "packages/protocol/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
#lint:
#name: Run Linters
#runs-on: ubuntu-latest
#strategy:
#matrix:
#node-version: [16.x]
#steps:
#- uses: actions/checkout@v3
#- name: Use Node.js
#uses: actions/setup-node@v3
#with:
#node-version: ${{ matrix.node-version }}
#cache: "yarn"
#- name: Install Foundry
#uses: foundry-rs/foundry-toolchain@v1
#with:
#version: nightly
#- run: yarn lint:check
forge:
name: Run Unit and E2E Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install forge dependencies
run: yarn protocol:install
- name: Precompile using 0.8.14 and via-ir=false
run: yarn protocol:build
- name: "Create env file"
run: |
touch .env
echo export RPC_MAINNET="${{ secrets.RPC_MAINNET }}" >> .env
echo export RPC_OPTIMISM="${{ secrets.RPC_OPTIMISM }}" >> .env
echo export RPC_RINKEBY="${{ secrets.RPC_RINKEBY }}" >> .env
echo export RPC_GOERLI="${{ secrets.RPC_GOERLI }}" >> .env
echo export RPC_OPTIMISM_GOERLI="${{ secrets.RPC_OPTIMISM_GOERLI }}" >> .env
cat .env
- name: "Test env file"
run: |
cat .env
- name: Run tests
shell: bash
run: |
source .env && yarn protocol:test