Skip to content

Commit

Permalink
Update the CI setup
Browse files Browse the repository at this point in the history
- Update actions to their latest version
- Add a job for PHP 8.3
- Use PHP 8.2 to run the dev deps as latest versions of our dependencies
  are not compatible with 7.4 or 8.0
  • Loading branch information
stof committed Nov 29, 2023
1 parent 9e4feb9 commit f4748eb
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ defaults:
shell: bash

jobs:
check_composer:
name: Check composer.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
- run: composer validate --strict --no-check-lock

static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
Expand All @@ -24,27 +35,25 @@ jobs:

tests:
name: Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
composer_flags: [ '' ]
minimum_stability: [ '' ]
symfony_deprecations_helper: [ '' ]
include:
- php: '7.2'
composer_flags: '--prefer-lowest --prefer-stable'
symfony_deprecations_helper: weak
- php: '8.0'
minimum_stability: dev
- php: '7.4'
- php: '8.2'
minimum_stability: dev
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand All @@ -57,17 +66,15 @@ jobs:

- name: Configure for minimum stability
if: "${{ matrix.minimum_stability == 'dev' }}"
run: |
composer config minimum-stability dev
run: composer config minimum-stability dev

- name: Install dependencies
run: |
composer update ${{ matrix.composer_flags }}
run: composer update ${{ matrix.composer_flags }}

- name: Run tests
run: |
export SYMFONY_DEPRECATIONS_HELPER="${{ matrix.symfony_deprecations_helper }}"
vendor/bin/phpunit -v --coverage-clover=coverage.xml
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ matrix.symfony_deprecations_helper }}"
run: vendor/bin/phpunit -v --coverage-clover=coverage.xml

- name: Upload coverage
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit f4748eb

Please sign in to comment.