Add db CI (#472)

* Add Go CI

* Adjust trigger

* Adjust trigger
This commit is contained in:
Jonas Plum
2025-08-24 10:49:59 +02:00
committed by GitHub
parent c904e3d34e
commit 98d3a90546
8 changed files with 47 additions and 9 deletions

38
.github/workflows/go.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Go
on:
push:
branches: [ main ]
paths:
- '.github/**'
- 'db/**'
pull_request:
paths:
- '.github/**'
- 'db/**'
jobs:
db-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: go fmt
run: go fmt ./...
working-directory: db
- name: Ensure formatting
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "Go files are not formatted"
exit 1
fi
git diff --exit-code
working-directory: db
- name: go vet
run: go vet ./...
working-directory: db
- name: go test
run: go test ./...
working-directory: db