-
Notifications
You must be signed in to change notification settings - Fork 43
84 lines (73 loc) · 2.37 KB
/
contracts-testing.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
84
name: Contracts Testing
on:
workflow_dispatch:
merge_group:
push:
branches:
- master
- dev
paths-ignore:
- "kleros-sdk/**"
- "services/**"
- "subgraph/**"
- "web/**"
pull_request:
branches:
- "*"
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
contracts-testing:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
binaries.soliditylang.org:443
classic.yarnpkg.com:443
github.com:443
nightly.yarnpkg.com:443
nodejs.org:443
objects.githubusercontent.com:443
registry.yarnpkg.com:443
registry.npmjs.org:443
54.185.253.63:443
- name: Setup Node.js environment
uses: actions/setup-node@2a017f350dbf6c4b6bb4508cc83809719115162e
with:
node-version: 18.x
- uses: actions/checkout@7739b9ba2efcda9dde65ad1e3c2dbe65b41dfba7
- name: Cache node modules
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-
#- name: Install parent dependencies
# run: |
# echo "current dir: $PWD"
# yarn install
- name: Install contracts dependencies
run: |
yarn workspace @kleros/kleros-v2-contracts install
- name: Compile
run: |
yarn hardhat compile
working-directory: contracts
- name: Test with coverage
run: |
yarn hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"./test/**/*.ts\" --show-stack-traces
working-directory: contracts
- name: Upload a build artifact
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
with:
name: code-coverage-report
path: contracts/coverage