Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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