2020-12-13 03:44:02 -06:00
|
|
|
name: Continuous integration
|
|
|
|
|
|
|
|
on:
|
2023-01-21 02:57:35 -06:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'LICENSE'
|
2023-01-22 14:01:46 -06:00
|
|
|
- '.*'
|
|
|
|
- '*.md'
|
|
|
|
- '*.xml'
|
|
|
|
- '*.yml*'
|
|
|
|
- '*.json5'
|
|
|
|
- '*.neon'
|
2020-12-13 03:44:02 -06:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- develop
|
2022-01-25 13:39:31 -06:00
|
|
|
- 2.x
|
2023-01-21 02:57:35 -06:00
|
|
|
paths-ignore:
|
|
|
|
- 'LICENSE'
|
2023-01-22 14:01:46 -06:00
|
|
|
- '.*'
|
|
|
|
- '*.md'
|
|
|
|
- '*.xml'
|
|
|
|
- '*.yml*'
|
|
|
|
- '*.json5'
|
|
|
|
- '*.neon'
|
2020-12-13 03:44:02 -06:00
|
|
|
|
|
|
|
jobs:
|
2020-12-13 05:59:06 -06:00
|
|
|
static-analysis:
|
2022-08-01 10:13:34 -05:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-13 05:59:06 -06:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-29 02:43:12 -05:00
|
|
|
php-version: ['8.2']
|
2021-12-09 11:51:26 -06:00
|
|
|
command: ['cs', 'stan', 'swagger:validate']
|
2020-12-13 05:59:06 -06:00
|
|
|
steps:
|
2023-11-04 06:42:31 -05:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-13 04:56:46 -05:00
|
|
|
- uses: './.github/actions/ci-setup'
|
2022-08-12 13:32:16 -05:00
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-version }}
|
2022-08-13 04:56:46 -05:00
|
|
|
extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ matrix.command }}
|
2021-12-09 11:51:26 -06:00
|
|
|
- run: composer ${{ matrix.command }}
|
2020-12-13 05:59:06 -06:00
|
|
|
|
2022-08-12 01:35:10 -05:00
|
|
|
unit-tests:
|
2022-08-12 02:13:04 -05:00
|
|
|
uses: './.github/workflows/ci-tests.yml'
|
2022-08-12 01:35:10 -05:00
|
|
|
with:
|
|
|
|
test-group: unit
|
|
|
|
|
2022-08-27 12:38:05 -05:00
|
|
|
cli-tests:
|
|
|
|
uses: './.github/workflows/ci-tests.yml'
|
|
|
|
with:
|
|
|
|
test-group: cli
|
|
|
|
|
2024-02-16 16:02:46 -06:00
|
|
|
api-tests:
|
2022-08-12 02:13:04 -05:00
|
|
|
uses: './.github/workflows/ci-tests.yml'
|
2022-08-12 01:35:10 -05:00
|
|
|
with:
|
|
|
|
test-group: api
|
|
|
|
|
2022-08-12 02:30:52 -05:00
|
|
|
sqlite-db-tests:
|
|
|
|
uses: './.github/workflows/ci-db-tests.yml'
|
|
|
|
with:
|
|
|
|
platform: 'sqlite:ci'
|
|
|
|
|
|
|
|
mysql-db-tests:
|
|
|
|
uses: './.github/workflows/ci-db-tests.yml'
|
|
|
|
with:
|
|
|
|
platform: 'mysql'
|
|
|
|
|
|
|
|
maria-db-tests:
|
|
|
|
uses: './.github/workflows/ci-db-tests.yml'
|
|
|
|
with:
|
|
|
|
platform: 'maria'
|
2020-12-13 06:11:41 -06:00
|
|
|
|
2022-08-12 02:30:52 -05:00
|
|
|
postgres-db-tests:
|
|
|
|
uses: './.github/workflows/ci-db-tests.yml'
|
|
|
|
with:
|
|
|
|
platform: 'postgres'
|
|
|
|
|
|
|
|
ms-db-tests:
|
|
|
|
uses: './.github/workflows/ci-db-tests.yml'
|
|
|
|
with:
|
|
|
|
platform: 'ms'
|
|
|
|
|
|
|
|
unit-mutation-tests:
|
2020-12-13 06:11:41 -06:00
|
|
|
needs:
|
2022-08-12 01:35:10 -05:00
|
|
|
- unit-tests
|
2022-08-12 02:32:30 -05:00
|
|
|
uses: './.github/workflows/ci-mutation-tests.yml'
|
2022-08-12 02:30:52 -05:00
|
|
|
with:
|
|
|
|
test-group: unit
|
|
|
|
|
|
|
|
db-mutation-tests:
|
|
|
|
needs:
|
|
|
|
- sqlite-db-tests
|
2022-08-12 02:32:30 -05:00
|
|
|
uses: './.github/workflows/ci-mutation-tests.yml'
|
2022-08-12 02:30:52 -05:00
|
|
|
with:
|
|
|
|
test-group: db
|
|
|
|
|
|
|
|
api-mutation-tests:
|
|
|
|
needs:
|
2024-02-16 16:02:46 -06:00
|
|
|
- api-tests
|
2022-08-12 02:32:30 -05:00
|
|
|
uses: './.github/workflows/ci-mutation-tests.yml'
|
2022-08-12 02:30:52 -05:00
|
|
|
with:
|
|
|
|
test-group: api
|
|
|
|
|
|
|
|
cli-mutation-tests:
|
|
|
|
needs:
|
2022-08-12 01:35:10 -05:00
|
|
|
- cli-tests
|
2022-08-12 02:32:30 -05:00
|
|
|
uses: './.github/workflows/ci-mutation-tests.yml'
|
2022-08-12 02:30:52 -05:00
|
|
|
with:
|
|
|
|
test-group: cli
|
2020-12-13 06:34:22 -06:00
|
|
|
|
|
|
|
upload-coverage:
|
2020-12-13 10:17:16 -06:00
|
|
|
needs:
|
2022-08-12 01:35:10 -05:00
|
|
|
- unit-tests
|
2024-02-16 16:02:46 -06:00
|
|
|
- api-tests
|
2022-08-12 01:35:10 -05:00
|
|
|
- cli-tests
|
2022-08-12 02:30:52 -05:00
|
|
|
- sqlite-db-tests
|
2022-08-01 10:13:34 -05:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-13 06:34:22 -06:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-29 02:43:12 -05:00
|
|
|
php-version: ['8.2']
|
2020-12-13 06:34:22 -06:00
|
|
|
steps:
|
2020-12-13 10:31:22 -06:00
|
|
|
- name: Checkout code
|
2023-11-04 06:42:31 -05:00
|
|
|
uses: actions/checkout@v4
|
2020-12-13 06:34:22 -06:00
|
|
|
- name: Use PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-version }}
|
2020-12-13 10:23:58 -06:00
|
|
|
coverage: pcov
|
|
|
|
ini-values: pcov.directory=module
|
2023-12-19 04:13:13 -06:00
|
|
|
- uses: actions/download-artifact@v4
|
2020-12-13 06:34:22 -06:00
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
- run: mv build/coverage-unit/coverage-unit.cov build/coverage-unit.cov
|
|
|
|
- run: mv build/coverage-db/coverage-db.cov build/coverage-db.cov
|
|
|
|
- run: mv build/coverage-api/coverage-api.cov build/coverage-api.cov
|
2022-08-10 10:13:21 -05:00
|
|
|
- run: mv build/coverage-cli/coverage-cli.cov build/coverage-cli.cov
|
2023-02-13 12:05:27 -06:00
|
|
|
- run: wget https://phar.phpunit.de/phpcov-9.0.0.phar
|
|
|
|
- run: php phpcov-9.0.0.phar merge build --clover build/clover.xml
|
2020-12-19 03:25:19 -06:00
|
|
|
- name: Publish coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
file: ./build/clover.xml
|
2020-12-13 06:34:22 -06:00
|
|
|
|
|
|
|
delete-artifacts:
|
|
|
|
needs:
|
2022-08-12 02:30:52 -05:00
|
|
|
- unit-mutation-tests
|
|
|
|
- db-mutation-tests
|
|
|
|
- api-mutation-tests
|
|
|
|
- cli-mutation-tests
|
2020-12-13 06:34:22 -06:00
|
|
|
- upload-coverage
|
2022-08-01 10:13:34 -05:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-13 06:34:22 -06:00
|
|
|
steps:
|
2023-04-12 12:13:35 -05:00
|
|
|
- uses: geekyeggo/delete-artifact@v2
|
2020-12-13 06:34:22 -06:00
|
|
|
with:
|
|
|
|
name: |
|
2023-04-12 12:13:35 -05:00
|
|
|
coverage-*
|