mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-08-01 04:01:01 +00:00
* fix(sync): preserve offline ops and harden auth * fix(sync): prevent unverified passkey replacement Keep existing credentials until email ownership is verified and scope failed-delivery cleanup to the exact pending registration. Reject negative operation timestamps while still allowing old offline operations.\n\nRefs #8961 * test(sync): cover registration races in PostgreSQL * ci(sync): run PostgreSQL integration tests * fix(sync): bind passkeys to email verification
65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
# super-sync-server unit tests (vitest), gated on PRs that touch server code.
|
|
# Previously these ran only nightly / on push to master via e2e-scheduled.yml, so
|
|
# server fixes were never gated by a PR check. The workflow-level `paths` filter keeps
|
|
# this off PRs that don't touch the server or its workspace deps.
|
|
name: SuperSync Server Tests
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- main
|
|
paths:
|
|
- 'packages/super-sync-server/**'
|
|
- 'packages/shared-schema/**' # @sp/shared-schema is a direct dep
|
|
- 'packages/sync-core/**' # transitive dep via @sp/shared-schema
|
|
- '.github/workflows/supersync-server-tests.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
supersync-server-tests:
|
|
name: SuperSync Server Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
env:
|
|
DATABASE_URL: postgresql://supersync:superpassword@localhost:5432/supersync_db
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_USER: supersync
|
|
POSTGRES_PASSWORD: superpassword
|
|
POSTGRES_DB: supersync_db
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd "pg_isready -U supersync -d supersync_db"
|
|
--health-interval 3s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
node-version: 22
|
|
cache: 'npm'
|
|
# work around for npm installs from git+https://github.com/johannesjo/J2M.git
|
|
- name: Reconfigure git to use HTTP authentication
|
|
run: >
|
|
git config --global url."https://github.com/".insteadOf
|
|
ssh://git@github.com/
|
|
- name: Install npm Packages
|
|
run: npm i
|
|
- name: Run SuperSync Server Tests
|
|
run: cd packages/super-sync-server && npm test
|
|
- name: Apply PostgreSQL Test Schema
|
|
working-directory: packages/super-sync-server
|
|
run: npx prisma db push --skip-generate
|
|
- name: Run SuperSync PostgreSQL Integration Tests
|
|
working-directory: packages/super-sync-server
|
|
run: npm run test:integration:postgres
|