Small CI flakiness fix and performance tweak (#3780)

* perf(ci): use Turbo to schedule both `lint` and `test` tasks at once

* fix(ci): wait until service containers are initialized for tests

This is achieved by adding a health check to the containers, and
instructing the CI workflow to wait until the containers are healthy.
Not doing this wait risks spurious CI failures due to DB migrations
being applied before the DB even starts.

* chore(turbo): use locally installed schema in new Turbo override file

On the latest versions of Turbo, this ensures that the used schema is
always in sync with what's available in the installed Turbo version,
which is something that has already caused confusion to me before.
This commit is contained in:
Alejandro González
2025-06-13 23:34:40 +02:00
committed by GitHub
parent ab8e474339
commit c9b98a6154
5 changed files with 41 additions and 22 deletions

View File

@@ -25,12 +25,6 @@ jobs:
with:
fetch-depth: 2
# This is required because Tauri depends on the frontend build directory to
# exist, but it is not created until the frontend is built, which may happen
# after the backend is built
- name: 📁 Create Tauri frontend build directories
run: mkdir -p apps/app-frontend/dist
- name: 🧰 Install build dependencies
run: |
sudo apt-get update
@@ -71,17 +65,14 @@ jobs:
- name: 🧰 Install dependencies
run: pnpm install
- name: 🔍 Lint
run: pnpm lint
- name: ⚙️ Start services
run: docker compose up -d
run: docker compose up --wait
- name: ⚙️ Setup Labrinth environment and database
working-directory: apps/labrinth
run: |
mv .env.local .env
cp .env.local .env
sqlx database setup
- name: ✔️ Test
run: pnpm test
- name: 🔍 Lint and test
run: pnpm run ci