-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (76 loc) · 1.92 KB
/
tests.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
name: Tests
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
merge_group:
types: [checks_requested]
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
FILES: |
go.mod
go.sum
- name: Compile
if: env.GIT_DIFF
run: |
go mod download
make build
test-unit-cover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
FILES: |
go.mod
go.sum
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
cache: true
- name: Test and Create Coverage Report
if: env.GIT_DIFF
run: |
EXPERIMENTAL=true make test-unit-cover
- uses: codecov/[email protected]
if: env.GIT_DIFF
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
fail_ci_if_error: true
verbose: true
test-e2e:
# skip the e2e tests when `skip-e2e-test` label is present on pull request
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-e2e-test') }}
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
FILES: |
go.mod
go.sum
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
cache: true
- name: Test E2E
if: env.GIT_DIFF
run: |
make test-e2e