-
Notifications
You must be signed in to change notification settings - Fork 15
54 lines (47 loc) · 1.44 KB
/
coverage.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: Code Coverage with Codecov
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Coverage-Codecov:
runs-on: ubuntu-latest
container:
image: iconbridge/build
options: --user 1001
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Javascore BMC coverage
working-directory: ./javascore/bmc
run: |
gradle test
- name: Javascore BTS coverage
working-directory: ./javascore/bts
run: |
gradle test
- name: GO test chain/icon
working-directory: ./cmd/iconbridge/chain/icon
run: |
go test -race -covermode=atomic -coverprofile=coverage.out || exit 0
- name: GO test cmd/iconbridge
working-directory: ./cmd/iconbridge
run: |
go test ./... -race -covermode=atomic -coverprofile=coverage.out || exit 0
- name: Solidity BTS coverage
working-directory: ./solidity/bts
run: |
yarn install
cp .env.example .env
truffle run coverage || exit 0 # Bug on truffle to compile while running coverage and it fails, so exit 0
- name: Solidity BMC coverage
working-directory: ./solidity/bmc
run: |
yarn install
PRIVATE_KEY=$PRIVATE_KEY BSC_RPC_URI=$BSC_RPC_URI BSC_NID=$BSC_NID BMC_BTP_NET=$BSC_BMC_NET BSC_NID=97 \
truffle run coverage || exit 0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3