build(deps): update module golang.org/x/tools to v0.30.0 (#63) #262
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
paths-ignore: | |
- '*.md' | |
branches: | |
- master | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
branches: | |
- master | |
env: | |
GOTOOLCHAIN: local | |
jobs: | |
# check go mod clean | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo go-mod-tidy > env.txt | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache-dependency-path: | | |
env.txt | |
go.sum | |
tools/go.sum | |
- run: go mod tidy | |
working-directory: tools | |
# check go mod clean | |
- run: go mod tidy | |
- run: git diff --exit-code | |
- run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
working-directory: tools | |
- run: govulncheck -tags release ./... | |
test: | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-14, macos-13 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache-dependency-path: | | |
go.sum | |
tools/go.sum | |
- run: go install gotest.tools/gotestsum@latest | |
working-directory: tools | |
- run: go get -t ./... | |
- run: >- | |
gotestsum --format=pkgname --format-hide-empty-pkg | |
-- -race -count=1 -coverprofile=coverage.txt -covermode=atomic ./... | |
shell: bash | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- run: >- | |
gotestsum --format=pkgname --format-hide-empty-pkg | |
-- -race -tags=release -count=1 -coverprofile=coverage.txt -covermode=atomic ./... | |
shell: bash | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- run: go build -tags=release -o tmp/try.exe | |
- run: ./tmp/try.exe --help | |
- run: go build -o tmp/try.exe | |
- run: ./tmp/try.exe --help | |
license: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: python tools/scan-license-header.py | |
lint: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.64.5 |