mirror of
https://github.com/yiisoft/yii2.git
synced 2026-02-20 00:32:19 +01:00
Refactor ci-sqlite.yml to use yiisoft/yii2-actions. (#20726)
This commit is contained in:
80
.github/workflows/ci-sqlite.yml
vendored
80
.github/workflows/ci-sqlite.yml
vendored
@@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
name: ci-sqlite
|
name: ci-sqlite
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -35,64 +34,29 @@ on:
|
|||||||
|
|
||||||
push: *ignore-paths
|
push: *ignore-paths
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
PHP_EXTENSIONS: curl, intl, pdo, pdo_sqlite
|
|
||||||
PHP_INI_VALUES: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC'
|
|
||||||
PHPUNIT_GROUP: sqlite
|
|
||||||
XDEBUG_MODE: coverage
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: PHP ${{ matrix.php }}-sqlite
|
name: SQLite tests with coverage
|
||||||
|
uses: yiisoft/yii2-actions/.github/workflows/phpunit.yml@master
|
||||||
env:
|
with:
|
||||||
COVERAGE_DRIVER: xdebug
|
concurrency-group: sqlite-${{ github.ref }}
|
||||||
|
coverage-driver: xdebug
|
||||||
runs-on: ubuntu-latest
|
enable-concurrency: true
|
||||||
|
extensions: curl, intl, pdo, pdo_sqlite
|
||||||
strategy:
|
os: '["ubuntu-latest","windows-latest"]'
|
||||||
fail-fast: false
|
php-version: '["7.4","8.5"]'
|
||||||
matrix:
|
phpunit-group: sqlite
|
||||||
php: [7.4, 8.5]
|
secrets:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
steps: &sqlite-steps
|
|
||||||
- name: Monitor action permissions.
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
uses: GitHubSecurityLab/actions-permissions/monitor@v1
|
|
||||||
|
|
||||||
- name: Checkout.
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
|
|
||||||
- name: Setup PHP with Composer.
|
|
||||||
uses: ./.github/actions/php-setup
|
|
||||||
with:
|
|
||||||
coverage-driver: ${{ env.COVERAGE_DRIVER }}
|
|
||||||
extensions: ${{ matrix.php < 8.0 && 'apc' || 'apcu' }}, ${{ env.PHP_EXTENSIONS }}
|
|
||||||
ini-values: ${{ env.PHP_INI_VALUES }}, session.save_path="${{ runner.temp }}"
|
|
||||||
php-version: ${{ matrix.php }}
|
|
||||||
|
|
||||||
- name: Run PHPUnit tests.
|
|
||||||
uses: ./.github/actions/phpunit
|
|
||||||
with:
|
|
||||||
coverage-driver: ${{ env.COVERAGE_DRIVER }}
|
|
||||||
coverage-token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
group: ${{ env.PHPUNIT_GROUP }}
|
|
||||||
|
|
||||||
tests-dev:
|
tests-dev:
|
||||||
name: PHP ${{ matrix.php }}-sqlite
|
name: SQLite tests
|
||||||
|
uses: yiisoft/yii2-actions/.github/workflows/phpunit.yml@master
|
||||||
env:
|
with:
|
||||||
COVERAGE_DRIVER: none
|
concurrency-group: sqlite-dev-${{ github.ref }}
|
||||||
|
coverage-driver: none
|
||||||
runs-on: ubuntu-latest
|
enable-concurrency: true
|
||||||
|
extensions: curl, intl, pdo, pdo_sqlite
|
||||||
strategy:
|
os: '["ubuntu-latest"]'
|
||||||
fail-fast: false
|
php-version: '["8.0","8.1","8.2","8.3","8.4"]'
|
||||||
matrix:
|
phpunit-group: sqlite
|
||||||
php: [8.0, 8.1, 8.2, 8.3, 8.4]
|
|
||||||
|
|
||||||
steps: *sqlite-steps
|
|
||||||
|
|||||||
Reference in New Issue
Block a user