ci: expand shared package validation and test coverage
Lint / Lint (push) Successful in 32s
Docker / Docker Build & Push (push) Failing after 2m22s
Tests / Go backend (push) Failing after 1m2s
Tests / Dashboard checks (push) Failing after 35s

- Add lint, formatting, vet, and publish workflow checks
- Run Go database tests with PostgreSQL and add Java tests
- Make consumer sync opt-in; update docs and Go dependency
This commit is contained in:
Gabriel20xx committed 2026-10-19 21:46:52 +00:00
1 parent 937f51b4fb
commit 0ff94f9b10
107 files changed
+10124 -410

No files matched your search

+6
View File
@@ -43,8 +43,14 @@ jobs:
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Check the generated root stylesheet is current
run: git diff --exit-code -- shared-styles.css
- name: Check for skipped tests
run: npm run media:enforce:no-skipped-tests
- name: Run Node/Svelte lint checks
run: npm run lint
- name: Check Prettier formatting
run: npm run format:check
go:
name: Lint (Go)
+43 -1
View File
@@ -54,6 +54,26 @@ jobs:
defaults:
run:
working-directory: backend
# A throwaway PostgreSQL for the tests that need a real database (the auth store, the
# platform-user SQL, mediacore's routes and the migrate package). Without these two
# variables those tests skip themselves.
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: scratch
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/scratch?sslmode=disable
SHARED_TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/scratch?sslmode=disable
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -62,8 +82,9 @@ jobs:
with:
go-version-file: backend/go.mod
cache: true
# -p 1 runs one package at a time, because the database tests share one scratch database.
- name: Run Go tests
run: go test ./...
run: go test -p 1 ./...
python:
name: Test (Python)
@@ -81,3 +102,24 @@ jobs:
run: python -m pip install --upgrade pip -e "packages/python-backend[fastapi]"
- name: Run Python tests
run: python -m unittest discover -s packages/python-backend/tests -p 'test_*.py'
java:
name: Test (Java)
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: packages/java-backend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
cache-dependency-path: packages/java-backend/pom.xml
- name: Run Java tests
run: mvn -B test