grokkit/.gitea/workflows/ci.yml
Greg Gauthier 47e7b51d1e
Some checks failed
CI / Test (push) Successful in 1m3s
CI / Lint (push) Failing after 39s
CI / Build (push) Failing after 33s
ci(workflow): add XAI_API_KEY env to tests and switch lint/build to ubuntu-gitea runner
- Inject XAI_API_KEY from secrets for test execution.
- Update lint and build jobs to run on ubuntu-gitea instead of ubuntu-latest.
2026-03-01 14:01:13 +00:00

82 lines
1.7 KiB
YAML

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
test:
name: Test
runs-on: ubuntu-gitea
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Run tests
env:
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
run: |
go test -v -race -coverprofile=coverage.out ./...
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
file: ./coverage.out
fail_ci_if_error: false
lint:
name: Lint
runs-on: ubuntu-gitea
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
build:
name: Build
runs-on: ubuntu-gitea
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Build
run: make build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: grokkit-linux-amd64
path: build/grokkit