-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 856 Bytes
/
ci.yaml
File metadata and controls
39 lines (32 loc) · 856 Bytes
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
name: CI
on:
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Golang
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest
- name: Run go mod tidy
run: go mod tidy
- name: Run gofumpt against code
run: gofumpt -l -w .
- name: Ensure no modified or uncommitted files
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Modified or uncommitted files found"
git status --porcelain
exit 1
fi
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest