-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (53 loc) · 1.56 KB
/
cadence_tests.yml
File metadata and controls
55 lines (53 loc) · 1.56 KB
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
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
name: Flow CLI Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
submodules: "true"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.23.x"
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/cache@v4
with:
path: ./imports
key: flow-deps-${{ hashFiles('flow.json') }}
- name: Install Flow CLI
env:
FLOW_CLI_VERSION: v2.7.2
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
- name: Update PATH and show Flow version
run: |
echo "/root/.local/bin" >> $GITHUB_PATH
echo "$HOME/.local/bin" >> $GITHUB_PATH
which flow || true
flow version
- name: Install dependencies
run: flow deps install --skip-alias --skip-deployments
- name: Run tests
run: flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" ./cadence/tests/*_test.cdc
- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
file: coverage.lcov
flags: unittests
name: codecov-coverage
token: ${{ secrets.CODECOV_TOKEN }}