Skip to content

Commit 471c745

Browse files
authored
feat: CI (#53)
Signed-off-by: Danny Kopping <[email protected]>
1 parent feab84f commit 471c745

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
ci:
12+
name: Checks
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
cache: true
23+
24+
- name: Run tests
25+
run: make test
26+
27+
- name: Run race detector tests
28+
run: make test-race
29+
30+
- name: Run make fmt
31+
run: make fmt
32+
33+
- name: Check for unstaged changes
34+
run: |
35+
if ! git diff --exit-code; then
36+
echo "Error: make fmt resulted in unstaged changes"
37+
echo "Please run 'make fmt' locally and commit the changes"
38+
exit 1
39+
fi

0 commit comments

Comments
 (0)