-
Notifications
You must be signed in to change notification settings - Fork 71
46 lines (44 loc) · 1.17 KB
/
run-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
name: Run tests
on:
workflow_dispatch:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
run: |
npm install
- name: Run tests
run: |
npx hardhat typechain
npm run test
env:
networkType: mainnet
ALCHEMY_ID: ${{ secrets.ALCHEMY_ID }}
- name: Check Test Coverage
run: |
npm run coverage
env:
networkType: mainnet
ALCHEMY_ID: ${{ secrets.ALCHEMY_ID }}