Merge branch 'develop' #241
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
name: CI | |
on: [push] | |
jobs: | |
blackbox: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
php-version: ['8.2', '8.3'] | |
dependency-versions: ['lowest', 'highest'] | |
mariadb: ['10', '11'] | |
elasticsearch: ['7.17.18'] | |
name: 'BlackBox' | |
services: | |
mariadb: | |
image: mariadb:${{ matrix.mariadb }} | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: example | |
ports: | |
- 3306 | |
elasticsearch: | |
image: elasticsearch:${{ matrix.elasticsearch }} | |
env: | |
discovery.type: single-node | |
ports: | |
- 9200 | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: root | |
POSTGRES_DB: example | |
ports: | |
- 5432 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl | |
coverage: none | |
- name: Composer | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: BlackBox | |
run: php blackbox.php | |
env: | |
DB_PORT: ${{ job.services.mariadb.ports[3306] }} | |
POSTGRES_DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
ES_PORT: ${{ job.services.elasticsearch.ports[9200] }} | |
coverage: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
php-version: ['8.2', '8.3'] | |
dependency-versions: ['lowest', 'highest'] | |
name: 'Coverage' | |
services: | |
mariadb: | |
image: mariadb:10 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: example | |
ports: | |
- 3306 | |
elasticsearch: | |
image: elasticsearch:7.17.18 | |
env: | |
discovery.type: single-node | |
ports: | |
- 9200 | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: root | |
POSTGRES_DB: example | |
ports: | |
- 5432 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl | |
coverage: xdebug | |
- name: Composer | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: BlackBox | |
run: php blackbox.php | |
env: | |
ENABLE_COVERAGE: 'true' | |
DB_PORT: ${{ job.services.mariadb.ports[3306] }} | |
POSTGRES_DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
ES_PORT: ${{ job.services.elasticsearch.ports[9200] }} | |
- uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
psalm: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['8.2', '8.3'] | |
dependency-versions: ['lowest', 'highest'] | |
name: 'Psalm' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl | |
- name: Composer | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: Psalm | |
run: vendor/bin/psalm --shepherd | |
cs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['8.2'] | |
name: 'CS' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl | |
- name: Composer | |
uses: "ramsey/composer-install@v2" | |
- name: CS | |
run: vendor/bin/php-cs-fixer fix --diff --dry-run |