-
Notifications
You must be signed in to change notification settings - Fork 43
87 lines (72 loc) · 1.79 KB
/
main.yml
File metadata and controls
87 lines (72 loc) · 1.79 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
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
82
83
84
85
86
87
name: CI
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
concurrency:
# Cancel any previous workflows if they are from a PR or push.
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
GO_VERSION: 1.24.10
LINT_VERSION: v2.6.2
jobs:
########################
# lint code
########################
lint:
name: lint code
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: '${{ env.LINT_VERSION }}'
########################
# run unit tests
########################
unit-test:
name: run unit tests
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v5
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'
- name: Install chantools
run: make install
- name: run unit tests
run: make unit
########################
# run integration tests
########################
integration-test:
name: run integration tests
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v5
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.GO_VERSION }}'
- name: Install chantools
run: make install
- name: run integration tests
run: make itest