Skip to content

Commit e466d16

Browse files
committed
Add coverage job to GH Actions
1 parent 13bc8f8 commit e466d16

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Coverage
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
test-with-coverage:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
lfs: true
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
cache: 'yarn'
21+
22+
- name: Start wasmd
23+
run: RUNNER_TRACKING_ID="" && ./scripts/wasmd/start.sh &
24+
- name: Start simapp
25+
run: RUNNER_TRACKING_ID="" && ./scripts/simapp50/start.sh &
26+
- name: Start slow simapp
27+
run: RUNNER_TRACKING_ID="" && ./scripts/simapp50/slow_start.sh &
28+
- name: Start Tendermint blockchains
29+
run: RUNNER_TRACKING_ID="" && ./scripts/tendermint/all_start.sh &
30+
- name: Start socket server
31+
run: RUNNER_TRACKING_ID="" && ./scripts/socketserver/start.sh &
32+
- name: Start http server
33+
run: RUNNER_TRACKING_ID="" && ./scripts/httpserver/start.sh &
34+
35+
- name: Install dependencies
36+
run: yarn install --immutable --immutable-cache --check-cache
37+
38+
- name: Build
39+
run: yarn build
40+
41+
- name: Initialize wasmd (deploy contracts and friends)
42+
run: ./scripts/wasmd/init.sh
43+
44+
- name: Test with coverage
45+
env:
46+
HTTPSERVER_ENABLED: 1
47+
SIMAPP50_ENABLED: 1
48+
SLOW_SIMAPP50_ENABLED: 1
49+
TENDERMINT_ENABLED: 1
50+
SOCKETSERVER_ENABLED: 1
51+
SKIP_BUILD: 1
52+
WASMD_ENABLED: 1
53+
run: yarn coverage
54+
55+
- uses: codecov/codecov-action@v5
56+
with:
57+
fail_ci_if_error: true
58+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)