Skip to content

Commit

Permalink
Update GH action config
Browse files Browse the repository at this point in the history
  • Loading branch information
MisatoTremor committed Feb 28, 2024
1 parent 4c74f56 commit 173b242
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 38 deletions.
59 changes: 21 additions & 38 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,56 +13,37 @@ jobs:
name: "PHPUnit"
runs-on: "ubuntu-20.04"
env:
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
SYMFONY_DEPRECATIONS_HELPER: ${{matrix.symfony-deprecations-helper}}

strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
dependencies:
- "lowest"
- "highest"
stability:
- "stable"
symfony-require:
- ""
symfony-deprecations-helper:
- ""
include:
exclude:
# Tests the lowest set of dependencies
- dependencies: "lowest"
stability: "stable"
php-version: "7.4"
symfony-deprecations-helper: "weak"

# Test LTS
- symfony-require: "4.4.*"
dependencies: "stable"
php-version: "7.4"
symfony-deprecations-helper: "weak"

# Test against latest Symfony 5.x dev
- symfony-require: "5.*"
dependencies: "highest"
php-version: "8.0"
symfony-deprecations-helper: "weak"

# Test against latest Symfony 6.x dev
- symfony-require: "6.*"
dependencies: "highest"
php-version: "8.0"
symfony-deprecations-helper: "weak"

# Test against latest Symfony dev
- php-version: "8.1"
- php-version: "7.4"
dependencies: "lowest"
include:
# Test against the highest set of dependencies
- php-version: "8.3"
dependencies: "highest"
stability: "dev"
symfony-deprecations-helper: "weak"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand All @@ -74,11 +55,11 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Enforce using stable dependencies"
run: "composer config minimum-stability stable"
if: "${{ matrix.stability == 'stable' }}"
if: "${{ matrix.composer-stability }}"
run: "composer config minimum-stability ${{ matrix.composer-stability }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"
Expand All @@ -87,10 +68,11 @@ jobs:
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v4"
with:
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}.coverage"
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ matrix.stability }}-${{ matrix.symfony-deprecations-helper }}-${{ hashFiles('composer.lock') }}.coverage"
path: "coverage.xml"
if-no-files-found: "ignore"

upload_coverage:
name: "Upload coverage to Codecov"
Expand All @@ -100,16 +82,17 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v2"
uses: "actions/download-artifact@v4"
with:
path: "reports"

- name: "Upload to Codecov"
uses: "codecov/codecov-action@v2"
uses: "codecov/codecov-action@v4"
with:
directory: reports
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ CHANGELOG
1.x
---

* Update GH action config
* Update supported Symfony versions

0 comments on commit 173b242

Please sign in to comment.