chore: conform cli-common to the library profile; document keyring dependency cost #113
Workflow file for this run
This file contains hidden or 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: | |
| branches: [main] | |
| pull_request: | |
| # bash on every runner (Git Bash on windows-latest): avoids PowerShell | |
| # native-arg mangling of flags like -coverprofile=coverage.out, and lets | |
| # the tidy check be written portably. | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Tidy | |
| run: | | |
| go mod tidy | |
| # Catch both modified tracked and newly-generated untracked | |
| # go.mod/go.sum (the latter once later tickets add deps). | |
| if [ -n "$(git status --porcelain -- go.mod go.sum)" ]; then | |
| echo "go.mod/go.sum not tidy:" | |
| git status --porcelain -- go.mod go.sum | |
| git diff -- go.mod go.sum | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -v -race -coverprofile=coverage.out ./... | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.12.2 |