Skip to content

v0.4.0: strings, numbers, hashing, format mini-language (#5) #19

v0.4.0: strings, numbers, hashing, format mini-language (#5)

v0.4.0: strings, numbers, hashing, format mini-language (#5) #19

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
GO_VERSION: "1.26.x"
jobs:
vet:
name: vet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
- run: go mod download
- run: go vet ./...
- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
- uses: golangci/golangci-lint-action@v9
with:
version: latest
args: --timeout=5m
test:
name: test (${{ matrix.os }} / go ${{ matrix.go }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ["1.26.x"]
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
check-latest: true
- run: go build ./...
- run: go test -race -count=1 ./...
coverage:
name: coverage
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true
- run: go test -race -covermode=atomic -coverprofile=coverage.txt ./...
- run: go tool cover -func=coverage.txt | tail -n 1
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.txt
retention-days: 7