Files
gpt-load/.github/workflows/ci.yml
T

77 lines
1.9 KiB
YAML

name: V2 CI
on:
push:
branches:
- v2
pull_request:
branches:
- v2
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Validate and build web UI
uses: ./.github/actions/web-ci
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: Check Go formatting
run: |
# go-format-check:start
formatted_files="$(gofmt -l .)"
test -z "${formatted_files}"
# go-format-check:end
- name: Check module graph
run: go mod tidy -diff
- name: Audit Go dependencies
run: go run golang.org/x/vuln/cmd/govulncheck@v1.1.4 ./...
- name: Run Go vet
run: go vet ./...
- name: Build backend
run: go build -o gpt-load .
- name: Install Chromium for browser E2E
run: pnpm --dir web exec playwright install --with-deps chromium
- name: Run production browser E2E
run: pnpm --dir web run test:e2e
- name: Run race-enabled tests
run: go test -race -count=1 . ./internal/...
- name: Check repository invariants
run: git diff --check
windows-encryption-acl:
runs-on: windows-2025
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: Test Windows secure file and storage ACLs
run: go test -v -count=1 ./internal/platform/securefile ./internal/platform/encryption ./internal/storage