Skip to content

Enforce draft edits; role check; update docs/UI #20

Enforce draft edits; role check; update docs/UI

Enforce draft edits; role check; update docs/UI #20

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test-and-build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
POSTGRES_DB: controlplane_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Apply migrations
env:
PGPASSWORD: testpassword
run: |
for f in migrations/*.sql; do
psql -h localhost -U testuser -d controlplane_test -f "$f"
done
- name: Run Go tests
env:
TEST_DATABASE_URL: postgres://testuser:testpassword@localhost:5432/controlplane_test?sslmode=disable
run: go test -v -count=1 ./...
- name: Build application
run: go build -v ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11