-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 1.58 KB
/
Copy pathcode_quality.yml
File metadata and controls
84 lines (68 loc) · 1.58 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
name: Code Quality
on:
push:
branches:
- main
pull_request:
jobs:
format:
name: format
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v6
with:
go-version: "1.26"
- name: Setup gofumpt
run: go install mvdan.cc/gofumpt@latest
- name: Format
run: gofumpt -extra -l -w .
golangci:
name: lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.26"
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
tests:
name: Build and Test
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
include:
- os: ubuntu-latest
race: true
- os: windows-latest
race: true
- os: macos-latest
race: true
- os: ubuntu-24.04-arm
race: true
- os: windows-11-arm
race: false
steps:
- uses: actions/checkout@v6
- name: Setup go
uses: actions/setup-go@v6
with:
go-version: "1.26"
- name: Run tests
if: ${{ !matrix.race }}
run: go test ./...
- name: Run tests with concurrency checks
if: ${{ matrix.race }}
run: go test -race ./...