44 lines
754 B
YAML
44 lines
754 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
env:
|
|
OPENAI_API_KEY: dummy
|
|
OPENAI_BASE_URL: http://localhost:11434/api/chat
|
|
OPENAI_MODEL: qwen3:latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Go Env
|
|
run: go env
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Test
|
|
run: go test -count=1 ./...
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Display Go version
|
|
run: go version
|
|
|