Skip to content

Commit 640f4cc

Browse files
committed
ci: Add GitHub Actions workflow for redemption tests
1 parent 19f7a56 commit 640f4cc

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: MOET Redemption Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- moet-redemption
7+
pull_request:
8+
branches:
9+
- main
10+
- moet-redemption
11+
12+
jobs:
13+
redemption-tests:
14+
name: Redemption Wrapper Tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
token: ${{ secrets.GH_PAT }}
20+
submodules: recursive
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version: "1.23.x"
26+
27+
- uses: actions/cache@v4
28+
with:
29+
path: ~/go/pkg/mod
30+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
31+
restore-keys: |
32+
${{ runner.os }}-go-
33+
34+
- name: Install Flow CLI
35+
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
36+
37+
- name: Flow CLI Version
38+
run: flow version
39+
40+
- name: Update PATH
41+
run: echo "/root/.local/bin" >> $GITHUB_PATH
42+
43+
- name: Install dependencies
44+
run: flow deps install --skip-alias --skip-deployments
45+
46+
- name: Run Redemption Tests
47+
run: flow test --cover --covercode="contracts" --coverprofile="redemption-coverage.lcov" ./cadence/tests/redemption_wrapper_test.cdc
48+
49+
- name: Upload coverage reports to Codecov
50+
uses: codecov/codecov-action@v3
51+
env:
52+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
53+
with:
54+
files: ./redemption-coverage.lcov
55+
flags: redemption
56+
name: redemption-coverage
57+

0 commit comments

Comments
 (0)