Skip to content

Commit

Permalink
Finish filling out database CI matricies
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Jun 3, 2023
1 parent 30531ed commit 2f99378
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion .github/workflows/ci-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ jobs:
strategy:
fail-fast: false
matrix:
database-type: [ 'SqlServer' ]
database-type: [ 'SqlServer', 'Sqlite', 'PostgresSql', 'MariaDB', 'MySql' ]
watchdog-type: [ 'Basic', 'System' ]
configuration: [ 'Debug', 'Release' ]
runs-on: windows-2019
Expand All @@ -333,6 +333,46 @@ jobs:
if: ${{ matrix.watchdog-type == 'Basic' }}
run: echo "General__UseBasicWatchdog=true" >> $Env:GITHUB_ENV

- name: Set Sqlite Connection Info
if: ${{ matrix.database-type == 'Sqlite' }}
shell: bash
run: |
echo "TGS_TEST_DATABASE_TYPE=Sqlite" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Data Source=TGS_${{ matrix.watchdog-type }}_${{ matrix.configuration }}.sqlite3;Mode=ReadWriteCreate" >> $GITHUB_ENV
- name: Setup Postgres
uses: ankane/setup-postgres@v1
if: ${{ matrix.database-type == 'PostgresSql' }}

- name: Set PostgresSql Connection Info
if: ${{ matrix.database-type == 'PostgresSql' }}
shell: bash
run: |
echo "TGS_TEST_DATABASE_TYPE=PostgresSql" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Application Name=tgstation-server;Host=127.0.0.1;Username=$USER;Database=TGS__${{ matrix.watchdog-type }}_${{ matrix.configuration }}" >> $GITHUB_ENV
- name: Setup MariaDB
uses: ankane/setup-mariadb@v1
if: ${{ matrix.database-type == 'MariaDB' }}

- name: Set MariaDB Connection Info
if: ${{ matrix.database-type == 'MariaDB' }}
shell: bash
run: |
echo "TGS_TEST_DATABASE_TYPE=MariaDB" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Server=127.0.0.1;uid=root;database=tgs__${{ matrix.watchdog-type }}_${{ matrix.configuration }}" >> $GITHUB_ENV
- name: Setup MySQL
uses: ankane/setup-mysql@v1
if: ${{ matrix.database-type == 'MySql' }}

- name: Set MySQL Connection Info
if: ${{ matrix.database-type == 'MySql' }}
shell: bash
run: |
echo "TGS_TEST_DATABASE_TYPE=MySql" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Server=127.0.0.1;uid=root;database=tgs__${{ matrix.watchdog-type }}_${{ matrix.configuration }}" >> $GITHUB_ENV
- name: Set SqlServer Connection Info
if: ${{ matrix.database-type == 'SqlServer' }}
shell: bash
Expand Down Expand Up @@ -394,6 +434,13 @@ jobs:
needs: dmapi-build
if: "!(cancelled() || failure()) && needs.dmapi-build.result == 'success'"
services: # We start all dbs here so we can just code the stuff once
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
SA_PASSWORD: myPassword
ACCEPT_EULA: 'Y'
ports:
- 1433:1433
postgres:
image: cyberboss/postgres-max-connections # Fork of _/postgres:latest with max_connections=500 becuase GitHub actions service containers have no way to set command lines. Rebuilds with updates.
ports:
Expand Down

0 comments on commit 2f99378

Please sign in to comment.