mirror of
https://github.com/vee1e/krply.git
synced 2026-09-01 09:49:51 +00:00
- go build, vet, unit/integration/e2e tests, and web build on push and pr - vercel auto-deploy of the web ui, production on main and preview on prs - requires VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID secrets
54 lines
1 KiB
YAML
54 lines
1 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
go:
|
|
name: build and test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.26.x"
|
|
cache: true
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Unit tests
|
|
run: go test ./...
|
|
|
|
- name: Integration tests (fake apiserver)
|
|
run: go test -tags integration ./test/integration/...
|
|
|
|
- name: End-to-end tests
|
|
run: go test -tags e2e ./test/e2e/...
|
|
|
|
web:
|
|
name: build web ui
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install
|
|
working-directory: web
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
working-directory: web
|
|
run: npm run build
|
|
|
|
- name: Verify dist
|
|
run: test -d web/dist && test -f web/dist/index.html
|