-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (38 loc) · 992 Bytes
/
ci.yml
File metadata and controls
47 lines (38 loc) · 992 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
40
41
42
43
44
45
46
47
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
ci:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Check for typos
uses: crate-ci/typos@631208b7aac2daa8b707f55e7331f9112b0e062d # v1.44.0
with:
config: .github/workflows/typos.toml
- name: Lint
run: make lint
- name: Run tests
run: make test
- name: Run race detector tests
run: make test-race
- name: Run make fmt
run: make fmt
- name: Check for unstaged changes
run: |
if ! git diff --exit-code; then
echo "Error: make fmt resulted in unstaged changes"
echo "Please run 'make fmt' locally and commit the changes"
exit 1
fi