Speed up ci checks (#2387)

This commit is contained in:
Lance Pioch
2026-06-12 10:29:48 -04:00
committed by GitHub
parent 21ed58839c
commit 2b9c08dc5d

View File

@@ -89,7 +89,7 @@ jobs:
MYSQL_DATABASE: testing MYSQL_DATABASE: testing
ports: ports:
- 3306 - 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=2s --health-timeout=5s --health-retries=30
env: env:
DB_CONNECTION: mysql DB_CONNECTION: mysql
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
@@ -129,12 +129,6 @@ jobs:
DB_PORT: ${{ job.services.database.ports[3306] }} DB_PORT: ${{ job.services.database.ports[3306] }}
DB_USERNAME: root DB_USERNAME: root
- name: Unit tests
run: vendor/bin/pest tests/Unit --parallel --do-not-fail-on-phpunit-warning
env:
DB_HOST: UNIT_NO_DB
SKIP_MIGRATIONS: true
- name: Integration tests - name: Integration tests
run: vendor/bin/pest tests/Integration --parallel --do-not-fail-on-phpunit-warning run: vendor/bin/pest tests/Integration --parallel --do-not-fail-on-phpunit-warning
env: env:
@@ -157,7 +151,7 @@ jobs:
MYSQL_DATABASE: testing MYSQL_DATABASE: testing
ports: ports:
- 3306 - 3306
options: --health-cmd="mariadb-admin ping || mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --tmpfs /var/lib/mysql:rw --health-cmd="mariadb-admin ping || mysqladmin ping" --health-interval=2s --health-timeout=5s --health-retries=30
env: env:
DB_CONNECTION: mariadb DB_CONNECTION: mariadb
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
@@ -197,12 +191,6 @@ jobs:
DB_PORT: ${{ job.services.database.ports[3306] }} DB_PORT: ${{ job.services.database.ports[3306] }}
DB_USERNAME: root DB_USERNAME: root
- name: Unit tests
run: vendor/bin/pest tests/Unit --parallel --do-not-fail-on-phpunit-warning
env:
DB_HOST: UNIT_NO_DB
SKIP_MIGRATIONS: true
- name: Integration tests - name: Integration tests
run: vendor/bin/pest tests/Integration --parallel --do-not-fail-on-phpunit-warning run: vendor/bin/pest tests/Integration --parallel --do-not-fail-on-phpunit-warning
env: env:
@@ -217,6 +205,13 @@ jobs:
matrix: matrix:
php: [8.5] php: [8.5]
database: ["postgres:17", "postgres:18"] database: ["postgres:17", "postgres:18"]
include:
# postgres:17 stores data in /var/lib/postgresql/data, 18+ requires a
# single mount at /var/lib/postgresql and errors on a data submount
- database: "postgres:17"
tmpfs: /var/lib/postgresql/data
- database: "postgres:18"
tmpfs: /var/lib/postgresql
services: services:
database: database:
image: ${{ matrix.database }} image: ${{ matrix.database }}
@@ -228,10 +223,11 @@ jobs:
ports: ports:
- 5432:5432 - 5432:5432
options: >- options: >-
--tmpfs ${{ matrix.tmpfs }}:rw
--health-cmd pg_isready --health-cmd pg_isready
--health-interval 10s --health-interval 2s
--health-timeout 5s --health-timeout 5s
--health-retries 5 --health-retries 30
env: env:
DB_CONNECTION: pgsql DB_CONNECTION: pgsql
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
@@ -269,11 +265,5 @@ jobs:
- name: Run Migrations - name: Run Migrations
run: php artisan migrate --force --seed run: php artisan migrate --force --seed
- name: Unit tests
run: vendor/bin/pest tests/Unit --parallel --do-not-fail-on-phpunit-warning
env:
DB_HOST: UNIT_NO_DB
SKIP_MIGRATIONS: true
- name: Integration tests - name: Integration tests
run: vendor/bin/pest tests/Integration --parallel --do-not-fail-on-phpunit-warning run: vendor/bin/pest tests/Integration --parallel --do-not-fail-on-phpunit-warning