Merge pull request #57 from subculture-collective/copilot/add-ci-lint-format-test

Add CI workflow for frontend and backend checks
This commit was merged in pull request #57.
This commit is contained in:
Patrick Fanella
2026-01-06 20:05:10 -06:00
committed by GitHub
2 changed files with 134 additions and 0 deletions

118
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,118 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
steps:
- name: Checkout code
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: Run ESLint
run: npm run lint
frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
steps:
- name: Checkout code
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: Build frontend
run: npm run build
frontend-test:
name: Frontend Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
steps:
- name: Checkout code
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: Run tests
run: npm run test
go-vet:
name: Go Vet
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Download dependencies
run: go mod download
- name: Run go vet
run: go vet ./...
go-test:
name: Go Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Download dependencies
run: go mod download
- name: Run go test
run: go test -v ./...

View File

@@ -92,6 +92,22 @@ SELECT name, ST_AsText(geom) FROM placemarks WHERE geometry_type = 'Point' LIMIT
✅ 44 styles loaded
✅ PostGIS spatial indexes created
✅ Docker containerized database
✅ CI/CD pipeline with automated checks
## CI/CD
The project includes a GitHub Actions CI workflow that runs on pushes and pull requests to the main branch:
**Frontend Checks:**
- **Lint**: ESLint validation of React/TypeScript code
- **Build**: TypeScript compilation and Vite production build
- **Test**: Vitest unit and integration tests
**Backend Checks:**
- **Go Vet**: Static analysis of Go code
- **Go Test**: Run all Go test suites
All jobs run in parallel with dependency caching (npm and Go modules) for optimal performance.
## Next Steps