Skip to content

fix: more tidy

fix: more tidy #870

Workflow file for this run

name: Go
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-14
# macos-15 is arm by default, macos-15-intel is available
- macos-15
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 20
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "~1.25.0"
id: go
- name: Get tags to make version.go
run: |
go tool mage deepen
- name: Get dependencies
run: |
go mod download
go mod verify
git diff --exit-code
- name: Verify tidy
run: |
go mod tidy
( cd magefiles && go mod tidy )
go work sync
git diff --exit-code
- name: Build
run: |
go tool mage compile
git diff --exit-code
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
- name: govulncheck
run: go tool mage lint:vulncheck
- name: Test with coverage
# building the coverage output runs the tests
run: go tool mage test:coverCI
- name: Generate coverage report
# even if tests fail, generate the report
if: ${{ always() }}
run: go tool mage test:coverHTML
- name: Upload tests to codecov
# upload the coverage report to codecov
if: ${{ always() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage (codecov)
if: ${{ always() }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
files: ./coverage.out
fail_ci_if_error: true
- name: Upload coverage (artifact)
if: ${{ always() }}
uses: actions/upload-artifact@v6.0.0
with:
name: coverage-${{ matrix.os }}.html
path: ./coverage.html
- name: Test with race detector
# combination of macos runners being slow and race detector messing with
# timing makes this combination too flaky for now
if: "!startsWith(matrix.os, 'macos-')"
run: go tool mage test:goRace