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*'
|
|
|
|
- '*.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*'
|
|
|
|
- '*.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
|
|
|
|
|
2024-02-20 15:26:04 -06:00
|
|
|
db-tests:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
platform: ['sqlite:ci', 'mysql', 'maria', 'postgres', 'ms']
|
2022-08-12 02:30:52 -05:00
|
|
|
uses: './.github/workflows/ci-db-tests.yml'
|
|
|
|
with:
|
2024-02-20 15:26:04 -06:00
|
|
|
platform: ${{ matrix.platform }}
|
2022-08-12 02:30:52 -05:00
|
|
|
|
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
|
2024-02-20 15:26:04 -06:00
|
|
|
- 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
|
2024-02-20 11:30:34 -06:00
|
|
|
uses: './.github/actions/ci-setup'
|
2020-12-13 06:34:22 -06:00
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-version }}
|
2024-02-20 11:30:34 -06:00
|
|
|
extensions-cache-key: tests-extensions-${{ matrix.php-version }}
|
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
|
2024-02-20 11:23:37 -06:00
|
|
|
- run: vendor/bin/phpcov merge build --clover build/clover.xml
|
2020-12-19 03:25:19 -06:00
|
|
|
- name: Publish coverage
|
2024-02-20 11:23:37 -06:00
|
|
|
uses: codecov/codecov-action@v4
|
2020-12-19 03:25:19 -06:00
|
|
|
with:
|
|
|
|
file: ./build/clover.xml
|
2020-12-13 06:34:22 -06:00
|
|
|
|
|
|
|
delete-artifacts:
|
|
|
|
needs:
|
|
|
|
- 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-*
|