Files
WeKnora/.github/workflows/cli.yml
T
dependabot[bot] 9344907627 chore(deps): bump actions/checkout from 3 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:58:31 +08:00

53 lines
1.4 KiB
YAML

name: CLI
# Builds and tests the cli/ Go module on every push / PR that touches it.
# Foundation PR (PR-1) gates: 3-platform `go build` + `go test ./...` green.
on:
push:
branches: [main]
paths:
- 'cli/**'
- '.github/workflows/cli.yml'
pull_request:
paths:
- 'cli/**'
- '.github/workflows/cli.yml'
defaults:
run:
working-directory: cli
# Windows default is PowerShell, which tokenizes `go test -coverprofile=coverage.out ./...`
# in a way that detaches `.out` as a separate positional package arg.
# Force bash everywhere so the run lines parse identically across platforms
# (Git Bash is preinstalled on windows-latest runners).
shell: bash
permissions:
contents: read
jobs:
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.24']
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
cache-dependency-path: cli/go.sum
- name: go build
run: go build ./...
- name: go test
run: go test -race -coverprofile=coverage.out ./...
- name: go vet
run: go vet ./...
- name: coverage report
if: matrix.os == 'ubuntu-latest'
run: go tool cover -func=coverage.out