-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.28 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
name: Ethereum Smart Contract
on:
push:
paths:
- 'smart-contract/**'
- '.github/**'
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: ./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('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
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
run: yarn coverage