-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.28 KB
/
test.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
name: Test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Compile contracts
run: yarn compile
- name: Store contract artifacts
uses: actions/upload-artifact@v3
with:
name: contracts-artifacts
path: build
- name: Create .env with Github Secrets
run: |
touch .env
echo FORK_RPC_PROVIDER=$FORK_RPC_PROVIDER >> .env
echo USDC_OWNER_ADDRESS=$USDC_OWNER_ADDRESS >> .env
env:
FORK_RPC_PROVIDER: ${{ secrets.FORK_RPC_PROVIDER }}
USDC_OWNER_ADDRESS: ${{ vars.USDC_OWNER_ADDRESS }}
- name: Hardhat Tests
run: |
yarn test