forked from warewulf/warewulf
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (94 loc) · 2.49 KB
/
check.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
name: check
on:
push:
branches:
- main
- 'v4.*.x'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- main
- 'v4.*.x'
paths-ignore:
- 'docs/**'
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Check Warewulf code with golang linter (golang ${{ matrix.go-version }})
run: make lint
vet:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Vet Warewulf code (golang ${{ matrix.go-version }})
run: make vet
fmt:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Check Warewulf code for formatting (golang ${{ matrix.go-version }})
run: test "$(make -s fmt | wc -l)" == 0
deadcode:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Check for dead Warewulf code (golang ${{ matrix.go-version }})
run: make deadcode
testsuite:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Run the test suite (golang ${{ matrix.go-version }})
run: make test
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Build Warewulf (golang ${{ matrix.go-version }})
run: make all