Skip to content

Clean up README documentation #132

Clean up README documentation

Clean up README documentation #132

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Generated code freshness
run: |
make generate
git diff --exit-code internal/api/ internal/cmd/commands.gen.go || {
echo "::error::Generated code is out of date. Run 'make generate' and commit the result."
exit 1
}
- name: Test
run: go test -race -count=1 -coverprofile=coverage.out ./...
- name: Coverage summary
run: go tool cover -func=coverage.out | tail -1
- name: Build binary
run: make build
- name: Verify binary runs
run: bin/alpaca version
integration:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Integration tests
env:
ALPACA_TEST_API_KEY: ${{ secrets.ALPACA_TEST_API_KEY }}
ALPACA_TEST_SECRET_KEY: ${{ secrets.ALPACA_TEST_SECRET_KEY }}
run: |
if [ -z "$ALPACA_TEST_API_KEY" ]; then
echo "::error::Integration secrets not configured - set ALPACA_TEST_API_KEY and ALPACA_TEST_SECRET_KEY in repo secrets"
exit 1
fi
make test-integration
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@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
with:
version: v2.11.4