Files
go-cuckoo/.gitea/workflows/ci.yml
T
mvhutz 05dbda496a
CI / Check PR Title (push) Has been skipped
CI / Go Lint (push) Successful in 1m23s
CI / Makefile Lint (push) Successful in 1m17s
CI / Markdown Lint (push) Successful in 47s
CI / Unit Tests (push) Successful in 1m12s
CI / Fuzz Tests (push) Successful in 2m16s
CI / Mutation Tests (push) Successful in 1m39s
ci: use go tool (#25)
## Description

Tool versions were not pinned to the repository: this caused issues with upgrades.

## Changes

- Use `go tool` for `checkmake`, `gremlins`, `golangci-lint`, `godoc` and `govulncheck`.

### Design Decisions

## Checklist

- [x] Tests pass
- [x] Docs updated

Reviewed-on: #25
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
2026-07-03 23:53:17 +00:00

97 lines
2.0 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
check-pr-title:
name: Check PR Title
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
TITLE: ${{ gitea.event.pull_request.title }}
steps:
- run: |
if ! echo "$TITLE" | grep -qE '^(WIP: )?(feat|fix|docs|chore|ci|test|refactor|perf|build|style|revert)(\(.+\))?(!)?: .+'; then
echo "::error::Pull Request title must follow conventional commits"
exit 1
fi
lint-go:
name: Go Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check go mod tidy
run: go mod tidy && git diff --exit-code go.mod go.sum
- name: Run linter
run: make lint-go
lint-makefile:
name: Makefile Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run mutation tests
run: make lint-makefile
lint-markdown:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v19
test-unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run unit tests
run: make test-unit
test-fuzz:
name: Fuzz Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run fuzz tests
run: make test-fuzz
test-mutation:
name: Mutation Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run mutation tests
run: make test-mutation