From 6e5257ca8b264597e3b2ba664422b4c297012c05 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Sat, 26 Jul 2025 08:00:06 -0400
Subject: [PATCH 01/12] added mysql tests
---
.github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 42cccdca2..74d0db151 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ jobs:
with:
args: lint --using=pint -v
- test-app:
+ test-sqlite:
needs: lint-app
runs-on: ubuntu-24.04
steps:
@@ -50,3 +50,46 @@ jobs:
- name: Run Tests
run: php artisan test --parallel
+
+ test-mysql:
+ needs: lint-app
+ runs-on: ubuntu-24.04
+ services:
+ mysql:
+ image: mysql:8.0
+ env:
+ MYSQL_ROOT_PASSWORD: root
+ MYSQL_DATABASE: laravel
+ MYSQL_USER: laravel
+ MYSQL_PASSWORD: password
+ ports:
+ - 3306:3306
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.3'
+
+ - name: Install Dependencies
+ run: |
+ composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ npm ci && npm run build
+
+ - name: Copy Environment File
+ run: cp .env.example .env
+
+ - name: Generate App Key
+ run: php artisan key:generate --quiet
+
+ - name: Run Tests
+ run: php artisan test --parallel
+ env:
+ DB_CONNECTION: mysql
+ DB_HOST: localhost
+ DB_DATABASE: laravel
+ DB_USERNAME: laravel
+ DB_PASSWORD: password
From fb89ff7ffb17f1d74bf50225c020d8a50ab7f42c Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Sat, 26 Jul 2025 08:23:16 -0400
Subject: [PATCH 02/12] Remove parallel execution from test commands in CI
workflow
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 74d0db151..69cd33f62 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -49,7 +49,7 @@ jobs:
run: php artisan key:generate --quiet
- name: Run Tests
- run: php artisan test --parallel
+ run: php artisan test
test-mysql:
needs: lint-app
@@ -86,7 +86,7 @@ jobs:
run: php artisan key:generate --quiet
- name: Run Tests
- run: php artisan test --parallel
+ run: php artisan test
env:
DB_CONNECTION: mysql
DB_HOST: localhost
From 4e8308d63404efd1b933de1e03644d43596d1e34 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 07:44:19 -0400
Subject: [PATCH 03/12] Refactor phpunit.xml to comment out unused environment
variables
---
phpunit.xml | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/phpunit.xml b/phpunit.xml
index 1f0019785..b5d6cb402 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -19,12 +19,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
From 957d5774456e57900d2aa3ba5def89f01985474e Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 07:59:26 -0400
Subject: [PATCH 04/12] Create SQLite database file in CI workflow for MySQL
tests
---
.github/workflows/ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 69cd33f62..ca5900bce 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -78,6 +78,7 @@ jobs:
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm ci && npm run build
+ touch database/database.sqlite
- name: Copy Environment File
run: cp .env.example .env
From 40a889959ebd73a08ed3539177d624da4916b3e1 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:00:24 -0400
Subject: [PATCH 05/12] Remove redundant SQLite database creation step from
MySQL test job
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ca5900bce..6463ca2a8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,6 +41,7 @@ jobs:
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm ci && npm run build
+ touch database/database.sqlite
- name: Copy Environment File
run: cp .env.example .env
@@ -78,7 +79,6 @@ jobs:
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm ci && npm run build
- touch database/database.sqlite
- name: Copy Environment File
run: cp .env.example .env
From c9374844b96f7cac7bb880b77687818424021532 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:05:18 -0400
Subject: [PATCH 06/12] Remove BCRYPT_ROUNDS environment variable from
phpunit.xml
---
phpunit.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/phpunit.xml b/phpunit.xml
index b5d6cb402..029d6ede2 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -21,7 +21,6 @@
-
From 0eed0b514d978e5694dd215587277eedf9069269 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:19:01 -0400
Subject: [PATCH 07/12] Fix SQLite database path and update MySQL port
configuration in CI workflow
---
.github/workflows/ci.yml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6463ca2a8..73f78090c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,13 +35,12 @@ jobs:
- name: Create SQLite Database
run: |
- touch database/testing.sqlite
+ touch database/database.sqlite
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm ci && npm run build
- touch database/database.sqlite
- name: Copy Environment File
run: cp .env.example .env
@@ -51,6 +50,8 @@ jobs:
- name: Run Tests
run: php artisan test
+ env:
+ DB_CONNECTION: sqlite
test-mysql:
needs: lint-app
@@ -64,7 +65,7 @@ jobs:
MYSQL_USER: laravel
MYSQL_PASSWORD: password
ports:
- - 3306:3306
+ - 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
@@ -91,6 +92,7 @@ jobs:
env:
DB_CONNECTION: mysql
DB_HOST: localhost
+ DB_PORT: 33306
DB_DATABASE: laravel
DB_USERNAME: laravel
DB_PASSWORD: password
From ad142dc780a8269ac70886441e449f39f5bed4c8 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:23:57 -0400
Subject: [PATCH 08/12] Add CI environment configuration and update MySQL
settings in workflow
---
.env.ci | 2 ++
.github/workflows/ci.yml | 22 ++++++++++------------
2 files changed, 12 insertions(+), 12 deletions(-)
create mode 100644 .env.ci
diff --git a/.env.ci b/.env.ci
new file mode 100644
index 000000000..74df3111a
--- /dev/null
+++ b/.env.ci
@@ -0,0 +1,2 @@
+APP_NAME="Speedtest Tracker"
+APP_KEY=
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 73f78090c..a6725de2f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -43,7 +43,7 @@ jobs:
npm ci && npm run build
- name: Copy Environment File
- run: cp .env.example .env
+ run: cp .env.ci .env
- name: Generate App Key
run: php artisan key:generate --quiet
@@ -58,14 +58,12 @@ jobs:
runs-on: ubuntu-24.04
services:
mysql:
- image: mysql:8.0
+ image: mysql:8
env:
- MYSQL_ROOT_PASSWORD: root
- MYSQL_DATABASE: laravel
- MYSQL_USER: laravel
- MYSQL_PASSWORD: password
+ MYSQL_ROOT_PASSWORD: password
+ MYSQL_DATABASE: testing
ports:
- - 33306:3306
+ - 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
@@ -82,7 +80,7 @@ jobs:
npm ci && npm run build
- name: Copy Environment File
- run: cp .env.example .env
+ run: cp .env.ci .env
- name: Generate App Key
run: php artisan key:generate --quiet
@@ -91,8 +89,8 @@ jobs:
run: php artisan test
env:
DB_CONNECTION: mysql
- DB_HOST: localhost
- DB_PORT: 33306
- DB_DATABASE: laravel
- DB_USERNAME: laravel
+ DB_HOST: 127.0.0.1
+ DB_PORT: 3306
+ DB_DATABASE: testing
+ DB_USERNAME: root
DB_PASSWORD: password
From 9c98c073b6f98e0b1216bc2a7cae7ff546bc9e0a Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:29:01 -0400
Subject: [PATCH 09/12] Add PostgreSQL and MariaDB test jobs to CI workflow
---
.github/workflows/ci.yml | 210 +++++++++++++++++++++++++++++++++++++++
1 file changed, 210 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a6725de2f..1cfd4a342 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -94,3 +94,213 @@ jobs:
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
+
+ test-postgres:
+ needs: lint-app
+ runs-on: ubuntu-24.04
+ services:
+ postgres:
+ image: postgres:15
+ env:
+ POSTGRES_PASSWORD: password
+ POSTGRES_DB: testing
+ ports:
+ - 5432:5432
+ options: --health-cmd="pg_isready -U postgres" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.3'
+
+ - name: Install Dependencies
+ run: |
+ composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ npm ci && npm run build
+
+ - name: Copy Environment File
+ run: cp .env.ci .env
+
+ - name: Generate App Key
+ run: php artisan key:generate --quiet
+
+ - name: Run Tests
+ run: php artisan test
+ env:
+ DB_CONNECTION: pgsql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 5432
+ DB_DATABASE: testing
+ DB_USERNAME: postgres
+ DB_PASSWORD: password
+
+ test-postgres-16:
+ needs: lint-app
+ runs-on: ubuntu-24.04
+ services:
+ postgres:
+ image: postgres:16
+ env:
+ POSTGRES_PASSWORD: password
+ POSTGRES_DB: testing
+ ports:
+ - 5432:5432
+ options: --health-cmd="pg_isready -U postgres" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.3'
+
+ - name: Install Dependencies
+ run: |
+ composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ npm ci && npm run build
+
+ - name: Copy Environment File
+ run: cp .env.ci .env
+
+ - name: Generate App Key
+ run: php artisan key:generate --quiet
+
+ - name: Run Tests
+ run: php artisan test
+ env:
+ DB_CONNECTION: pgsql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 5432
+ DB_DATABASE: testing
+ DB_USERNAME: postgres
+ DB_PASSWORD: password
+
+ test-postgres-17:
+ needs: lint-app
+ runs-on: ubuntu-24.04
+ services:
+ postgres:
+ image: postgres:17
+ env:
+ POSTGRES_PASSWORD: password
+ POSTGRES_DB: testing
+ ports:
+ - 5432:5432
+ options: --health-cmd="pg_isready -U postgres" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.3'
+
+ - name: Install Dependencies
+ run: |
+ composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ npm ci && npm run build
+
+ - name: Copy Environment File
+ run: cp .env.ci .env
+
+ - name: Generate App Key
+ run: php artisan key:generate --quiet
+
+ - name: Run Tests
+ run: php artisan test
+ env:
+ DB_CONNECTION: pgsql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 5432
+ DB_DATABASE: testing
+ DB_USERNAME: postgres
+ DB_PASSWORD: password
+
+ test-mariadb-11:
+ needs: lint-app
+ runs-on: ubuntu-24.04
+ services:
+ mariadb:
+ image: mariadb:11
+ env:
+ MARIADB_ROOT_PASSWORD: password
+ MARIADB_DATABASE: testing
+ ports:
+ - 3306:3306
+ options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.3'
+
+ - name: Install Dependencies
+ run: |
+ composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ npm ci && npm run build
+
+ - name: Copy Environment File
+ run: cp .env.ci .env
+
+ - name: Generate App Key
+ run: php artisan key:generate --quiet
+
+ - name: Run Tests
+ run: php artisan test
+ env:
+ DB_CONNECTION: mysql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 3306
+ DB_DATABASE: testing
+ DB_USERNAME: root
+ DB_PASSWORD: password
+
+ test-mariadb-12:
+ needs: lint-app
+ runs-on: ubuntu-24.04
+ services:
+ mariadb:
+ image: mariadb:12
+ env:
+ MARIADB_ROOT_PASSWORD: password
+ MARIADB_DATABASE: testing
+ ports:
+ - 3306:3306
+ options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.3'
+
+ - name: Install Dependencies
+ run: |
+ composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ npm ci && npm run build
+
+ - name: Copy Environment File
+ run: cp .env.ci .env
+
+ - name: Generate App Key
+ run: php artisan key:generate --quiet
+
+ - name: Run Tests
+ run: php artisan test
+ env:
+ DB_CONNECTION: mysql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 3306
+ DB_DATABASE: testing
+ DB_USERNAME: root
+ DB_PASSWORD: password
From 9c823a3ea53c85d84c284e688f132103ffeca6ba Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:31:00 -0400
Subject: [PATCH 10/12] Refactor CI workflow to replace SQLite with MariaDB for
testing, update environment variables, and remove redundant steps.
---
.github/workflows/ci.yml | 84 ++++++++++------------------------------
1 file changed, 21 insertions(+), 63 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1cfd4a342..de10d1d17 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,9 +21,18 @@ jobs:
with:
args: lint --using=pint -v
- test-sqlite:
+test-mariadb-11:
needs: lint-app
runs-on: ubuntu-24.04
+ services:
+ mariadb:
+ image: mariadb:11
+ env:
+ MARIADB_ROOT_PASSWORD: password
+ MARIADB_DATABASE: testing
+ ports:
+ - 3306:3306
+ options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -33,10 +42,6 @@ jobs:
with:
php-version: '8.3'
- - name: Create SQLite Database
- run: |
- touch database/database.sqlite
-
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
@@ -51,9 +56,14 @@ jobs:
- name: Run Tests
run: php artisan test
env:
- DB_CONNECTION: sqlite
+ DB_CONNECTION: mysql
+ DB_HOST: 127.0.0.1
+ DB_PORT: 3306
+ DB_DATABASE: testing
+ DB_USERNAME: root
+ DB_PASSWORD: password
- test-mysql:
+ test-mysql-8:
needs: lint-app
runs-on: ubuntu-24.04
services:
@@ -221,18 +231,9 @@ jobs:
DB_USERNAME: postgres
DB_PASSWORD: password
- test-mariadb-11:
+ test-sqlite:
needs: lint-app
runs-on: ubuntu-24.04
- services:
- mariadb:
- image: mariadb:11
- env:
- MARIADB_ROOT_PASSWORD: password
- MARIADB_DATABASE: testing
- ports:
- - 3306:3306
- options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -242,47 +243,9 @@ jobs:
with:
php-version: '8.3'
- - name: Install Dependencies
+ - name: Create SQLite Database
run: |
- composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- npm ci && npm run build
-
- - name: Copy Environment File
- run: cp .env.ci .env
-
- - name: Generate App Key
- run: php artisan key:generate --quiet
-
- - name: Run Tests
- run: php artisan test
- env:
- DB_CONNECTION: mysql
- DB_HOST: 127.0.0.1
- DB_PORT: 3306
- DB_DATABASE: testing
- DB_USERNAME: root
- DB_PASSWORD: password
-
- test-mariadb-12:
- needs: lint-app
- runs-on: ubuntu-24.04
- services:
- mariadb:
- image: mariadb:12
- env:
- MARIADB_ROOT_PASSWORD: password
- MARIADB_DATABASE: testing
- ports:
- - 3306:3306
- options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: '8.3'
+ touch database/database.sqlite
- name: Install Dependencies
run: |
@@ -298,9 +261,4 @@ jobs:
- name: Run Tests
run: php artisan test
env:
- DB_CONNECTION: mysql
- DB_HOST: 127.0.0.1
- DB_PORT: 3306
- DB_DATABASE: testing
- DB_USERNAME: root
- DB_PASSWORD: password
+ DB_CONNECTION: sqlite
\ No newline at end of file
From 06a981b649e61b76721b48a47ec90b5b48aa6954 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:31:22 -0400
Subject: [PATCH 11/12] Rename test-postgres job to test-postgres-15 for
clarity and consistency
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index de10d1d17..92e3a6a56 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -105,7 +105,7 @@ test-mariadb-11:
DB_USERNAME: root
DB_PASSWORD: password
- test-postgres:
+ test-postgres-15:
needs: lint-app
runs-on: ubuntu-24.04
services:
From 83f7fccc1eb978cef1dca747ebb13beecacc8a52 Mon Sep 17 00:00:00 2001
From: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Date: Mon, 28 Jul 2025 08:31:52 -0400
Subject: [PATCH 12/12] Fix indentation for test-mariadb-11 job in CI workflow
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 92e3a6a56..2bbd1b52c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,7 +21,7 @@ jobs:
with:
args: lint --using=pint -v
-test-mariadb-11:
+ test-mariadb-11:
needs: lint-app
runs-on: ubuntu-24.04
services: