-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (32 loc) · 777 Bytes
/
ci.yml
File metadata and controls
39 lines (32 loc) · 777 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:
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: 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