Skip to content

Merge pull request #9 from Bandwidth/fix/profile-state-handling #21

Merge pull request #9 from Bandwidth/fix/profile-state-handling

Merge pull request #9 from Bandwidth/fix/profile-state-handling #21

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Build
run: go build -o band ./cmd/band
- name: Test
run: go test ./... -v
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v7
security:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
run: govulncheck ./...
docs-check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check for doc updates
run: |
BASE=${{ github.event.pull_request.base.sha }}
HEAD=${{ github.event.pull_request.head.sha }}
CHANGED=$(git diff --name-only "$BASE" "$HEAD")
CODE_CHANGED=false
DOCS_CHANGED=false
# Check if command surface or flags changed
if echo "$CHANGED" | grep -qE '^cmd/|^internal/cmdutil/'; then
CODE_CHANGED=true
fi
# Check if any docs were touched
if echo "$CHANGED" | grep -qE '^README\.md$|^AGENTS\.md$'; then
DOCS_CHANGED=true
fi
if [ "$CODE_CHANGED" = true ] && [ "$DOCS_CHANGED" = false ]; then
echo "::warning::Command code changed without documentation updates. If this PR adds, removes, or changes commands/flags, please update README.md and/or AGENTS.md."
fi