From 17e7aaf380d02a9e6fe2e67de27e045330ae4bc3 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 7 Nov 2024 10:50:50 +1300 Subject: [PATCH] Update workfow --- .github/workflows/ci.yml | 59 +++++++++++++--------------------------- 1 file changed, 19 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed8bce1..713ab2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,46 +2,25 @@ name: CI on: push: - branches: [ main ] pull_request: - branches: [ main ] + workflow_dispatch: jobs: - tests: - name: PHP ${{ matrix.php }} - Silverstripe ${{ matrix.silverstripe }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: ['8.1'] - silverstripe: ['4.13', '5.0'] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mbstring, intl, pdo, mysql - coverage: xdebug - - - name: Install dependencies - run: | - composer require --no-update silverstripe/framework:^${{ matrix.silverstripe }} - composer install --no-interaction --no-progress - - - name: Run PHP CS Fixer - run: vendor/bin/php-cs-fixer fix --dry-run --diff - - - name: Run PHPStan - run: vendor/bin/phpstan analyse - - - name: Run PHPUnit - run: vendor/bin/phpunit --coverage-clover=coverage.xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - file: ./coverage.xml \ No newline at end of file + ci: + name: CI + uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 + with: + dynamic_matrix: true + # extra_jobs: | + # - php: '8.1' + # db: mysql80 + # phpunit: true + # installer_version: ^4 + # - php: '8.2' + # db: mysql80 + # phpunit: true + # installer_version: ^5 + # - php: '8.2' + # db: mariadb + # phpunit: true + # installer_version: ^5 \ No newline at end of file