-
Notifications
You must be signed in to change notification settings - Fork 18
54 lines (45 loc) · 1.33 KB
/
ethereum-smart-contract.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
name: Ethereum Smart Contract
on:
push:
paths:
- 'ethereum/smart-contract/**'
- '.github/**'
pull_request:
jobs:
ethereum-gateway-smart-contract-test:
name: Build and test the ethereum smart-contract code on ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['20.x']
os: [ubuntu-latest]
defaults:
run:
working-directory: ./ethereum/smart-contract
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache node dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: yarn-ethereum-${{ hashFiles('ethereum/yarn.lock') }}
- name: NPM login
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Install
run: yarn
- name: Build
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
run: yarn build
- name: Test with coverage
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
run: yarn coverage