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
29 changes: 23 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Go CI

on:
push:
Expand All @@ -7,19 +7,36 @@ on:
branches: [ main ]

jobs:
build-and-test:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22' # Adjust to match your go.mod
go-version-file: go.mod
cache: true

- name: Install dependencies
run: go mod tidy
# Ensures go.mod/go.sum are clean
- name: Verify dependencies
run: |
go mod tidy
git diff --exit-code

- name: Run tests
run: go test ./...
run: |
go test ./... -race -count=1

- name: Run tests with coverage
run: |
go test ./... -coverprofile=coverage.out
go tool cover -func=coverage.out

- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
Loading