Skip to content

Commit

Permalink
Update workfow
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-rainville committed Nov 6, 2024
1 parent faef9b0 commit 17e7aaf
Showing 1 changed file with 19 additions and 40 deletions.
59 changes: 19 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit 17e7aaf

Please sign in to comment.