-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from abbasudo/feature/mariadb
add mariadb driver
- Loading branch information
Showing
8 changed files
with
641 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
db: [ sqlite, mysql ,pgsql ] | ||
db: [ sqlite, mysql, pgsql ] | ||
php: [ 8.2, 8.3 ] | ||
prefer: [ lowest, stable ] | ||
|
||
|
@@ -57,12 +57,24 @@ jobs: | |
sudo -u postgres psql -c "CREATE USER test_user WITH PASSWORD 'passw0rd!';" | ||
sudo -u postgres psql -c "ALTER DATABASE test_db OWNER TO test_user;" | ||
# - name: Configure MariaDB | ||
# if: matrix.db == 'mariadb' | ||
# uses: getong/[email protected] | ||
# with: | ||
# host port: 3800 | ||
# container port: 3307 | ||
# character set server: 'utf8' | ||
# collation server: 'utf8_general_ci' | ||
# mariadb version: '10.4.10' | ||
# mysql database: 'test_db' | ||
# mysql root password: 'root' | ||
|
||
- name: Run PHPUnit tests | ||
env: | ||
DB_CONNECTION: ${{ matrix.db }} | ||
DB_HOST: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && '127.0.0.1') || (matrix.db == 'pgsql' && '127.0.0.1') }} | ||
DB_PORT: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && '3306') || (matrix.db == 'pgsql' && '5432') }} | ||
DB_DATABASE: ${{ matrix.db == 'sqlite' && ':memory:' || (matrix.db == 'mysql' && 'test_db') || (matrix.db == 'pgsql' && 'test_db') }} | ||
DB_USERNAME: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && 'root') || (matrix.db == 'pgsql' && 'test_user') }} | ||
DB_PASSWORD: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && 'root') || (matrix.db == 'pgsql' && 'passw0rd!') }} | ||
run: vendor/bin/phpunit | ||
DB_HOST: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && '127.0.0.1') || (matrix.db == 'pgsql' && '127.0.0.1') || (matrix.db == 'mariadb' && '127.0.0.1') }} | ||
DB_PORT: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && '3306') || (matrix.db == 'pgsql' && '5432') || (matrix.db == 'mariadb' && '3800') }} | ||
DB_DATABASE: ${{ matrix.db == 'sqlite' && ':memory:' || (matrix.db == 'mysql' && 'test_db') || (matrix.db == 'pgsql' && 'test_db') || (matrix.db == 'mariadb' && 'test_db') }} | ||
DB_USERNAME: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && 'root') || (matrix.db == 'pgsql' && 'test_user') || (matrix.db == 'mariadb' && 'root') }} | ||
DB_PASSWORD: ${{ matrix.db == 'sqlite' && '' || (matrix.db == 'mysql' && 'root') || (matrix.db == 'pgsql' && 'passw0rd!') || (matrix.db == 'mariadb' && 'root') }} | ||
run: vendor/bin/phpunit |
Oops, something went wrong.