- Remove worker-api-tests job (worker-api/ directory was removed) - Remove indexer-tests job (cmd/acb-indexer/ was removed, replaced by Go acb-index-builder) - Add cmd tests to go-tests job to run all Go tests - Add lint and type check steps to web-build job
70 lines
1.4 KiB
YAML
70 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
jobs:
|
|
# Go engine and cmd tests
|
|
go-tests:
|
|
name: Go Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
cache: true
|
|
|
|
- name: Run engine tests
|
|
run: go test ./engine/... -v -race
|
|
|
|
- name: Run cmd tests
|
|
run: go test ./cmd/... -v -race
|
|
|
|
- name: Build CLI tools
|
|
run: |
|
|
go build ./cmd/acb-local
|
|
go build ./cmd/acb-mapgen
|
|
go build ./cmd/acb-worker
|
|
|
|
# Web build
|
|
web-build:
|
|
name: Web Build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: web
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
continue-on-error: true
|
|
|
|
- name: Type check
|
|
run: npx tsc --noEmit
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: web-dist
|
|
path: web/dist/
|
|
retention-days: 7
|