Added other database test envs to ci workflow

This commit is contained in:
Alejandro Celaya 2020-12-13 12:31:34 +01:00
parent 0e58d1a242
commit ac85b913c2

View file

@ -10,25 +10,28 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php-version }}
tools: composer
extensions: swoole-4.5.9
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer cs
unit-tests:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.php-version == '8.0' }}
strategy:
matrix:
php-version:
- 7.4
- 8.0
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
@ -45,15 +48,13 @@ jobs:
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: composer test:unit:ci
# TODO Upload code coverage
# TODO Upload code coverage on one PHP version only
db-tests-sqlite:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 7.4
- 8.0
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
@ -70,15 +71,13 @@ jobs:
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: composer test:db:sqlite:ci
# TODO Upload code coverage
# TODO Upload code coverage on one PHP version only
db-tests-mysql:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 7.4
- 8.0
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
@ -90,19 +89,90 @@ jobs:
php-version: ${{ matrix.php-version }}
tools: composer
extensions: swoole-4.5.9
coverage: none
- if: ${{ matrix.php-version == '8.0' }}
run: composer install --no-interaction --prefer-dist --ignore-platform-req=php
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: composer test:db:mysql
api-tests:
db-tests-maria:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 7.4
- 8.0
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Start database
run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_maria
- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
extensions: swoole-4.5.9
coverage: none
- if: ${{ matrix.php-version == '8.0' }}
run: composer install --no-interaction --prefer-dist --ignore-platform-req=php
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: composer test:db:maria
db-tests-postgres:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Start database
run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_postgres
- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
extensions: swoole-4.5.9
coverage: none
- if: ${{ matrix.php-version == '8.0' }}
run: composer install --no-interaction --prefer-dist --ignore-platform-req=php
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: composer test:db:postgres
db-tests-ms:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install MSSQL ODBC
run: ./data/infra/ci/install-ms-odbc.sh
- name: Start database
run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_ms
- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
extensions: swoole-4.5.9, pdo_sqlsrv-5.9.0beta2
coverage: none
- if: ${{ matrix.php-version == '8.0' }}
run: composer install --no-interaction --prefer-dist --ignore-platform-req=php
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: composer test:db:ms
api-tests:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.php-version == '8.0' }}
strategy:
matrix:
php-version: ['7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
@ -121,4 +191,4 @@ jobs:
- if: ${{ matrix.php-version != '8.0' }}
run: composer install --no-interaction --prefer-dist
- run: bin/test/run-api-tests.sh
# TODO Upload code coverage
# TODO Upload code coverage on one PHP version only