Pulse/.github/workflows/ci.yml
2025-09-29 20:19:18 +00:00

57 lines
1.3 KiB
YAML

name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
backend:
name: Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify gofmt
run: |
fmt_out=$(gofmt -l ./cmd ./internal ./pkg)
if [ -n "$fmt_out" ]; then
echo "The following files are not gofmt formatted:"
echo "$fmt_out"
exit 1
fi
- name: Go vet
run: go vet ./...
- name: Go test
run: go test ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: ./...
frontend:
name: Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend-modern
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend-modern/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npm run type-check
- name: Format check
run: npm run format:check