Skip to content

Merge pull request #7 from scalytics/main #5

Merge pull request #7 from scalytics/main

Merge pull request #7 from scalytics/main #5

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
go-ci:
name: Go Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24.13"
cache-dependency-path: go.sum
- name: Verify formatting (gofmt)
run: |
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
echo "The following files are not gofmt-formatted:"
echo "$unformatted"
exit 1
fi
- name: Go vet
run: go vet ./...
- name: Run tests
run: go test ./...
- name: Run race detector
run: go test -race ./...
- name: Upload coverage artifact
run: go test -coverprofile=coverage.out ./...
- name: Store coverage file
uses: actions/upload-artifact@v4
with:
name: coverage.out
path: coverage.out