Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ jobs:

services:
postgres:
image: ${{ matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && matrix.db != 'postgres:14' && matrix.db != 'postgres:15' && 'postgres:10' || matrix.db }}
image: ${{ matrix.db }}
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
Expand All @@ -394,7 +394,7 @@ jobs:
- 5432:5432
options: >-
-v /var/run/postgresql:/var/run/postgresql
--health-cmd pg_isready
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
Expand Down Expand Up @@ -522,19 +522,22 @@ jobs:
include:
- php: ${{ inputs.PRIMARY_PHP_VERSION }}
db: "sqlite3"
db_image: ''
- php: ${{ inputs.PRIMARY_PHP_VERSION }}
db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
db: "mssql"
db_image: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
db_alias: 'MSSQL 2019'
- php: ${{ inputs.PRIMARY_PHP_VERSION }}
db: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04"
db: "mssql"
db_image: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04"
db_alias: 'MSSQL 2022'


name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}

services:
mssql:
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }}
image: ${{ matrix.db_image }}
env:
SA_PASSWORD: "Pssw0rd_12"
ACCEPT_EULA: "y"
Expand Down Expand Up @@ -574,19 +577,6 @@ jobs:
with:
path: phpBB4/phpBB/ext/${{ env.EXTNAME }}

- name: Set database type
id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
if [ "$MATRIX_DB" == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ "$MATRIX_DB" == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ]
then
db='mssql'
else
db="${MATRIX_DB%%:*}"
fi
echo "db=$db" >> "$GITHUB_OUTPUT"

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -596,15 +586,15 @@ jobs:

- name: Setup environment for phpBB
env:
DB: ${{steps.database-type.outputs.db}}
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
NOTESTS: '0'
run: .github/setup-phpbb.sh "$DB" "$PHP_VERSION" "${NOTESTS:-0}"
working-directory: ./phpBB4

- name: Setup database
env:
DB: ${{steps.database-type.outputs.db}}
DB: ${{ matrix.db }}
MYISAM: '0'
run: .github/setup-database.sh "$DB" "$MYISAM"
working-directory: ./phpBB4
Expand Down Expand Up @@ -650,7 +640,7 @@ jobs:

- name: Run unit tests
env:
DB: ${{steps.database-type.outputs.db}}
DB: ${{ matrix.db }}
run: |
args=()
if [ "$FUNCTIONAL_TESTS" == "0" ]; then
Expand Down
Loading