Skip to content

Commit

Permalink
Run Psalm & coverage on PHP 8.3, use env vars for PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Dec 23, 2023
1 parent ff00a7c commit 5f591ed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
pull_request:

env:
PSALM_PHP_VERSION: "8.3"
COVERAGE_PHP_VERSION: "8.3"

jobs:
psalm:
name: Psalm
Expand All @@ -16,7 +20,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: ${{ env.PSALM_PHP_VERSION }}

- name: Install composer dependencies
uses: ramsey/composer-install@v2
Expand Down Expand Up @@ -57,16 +61,16 @@ jobs:

- name: Run PHPUnit
run: vendor/bin/phpunit
if: ${{ matrix.php-version != '8.1' }}
if: ${{ matrix.php-version != env.COVERAGE_PHP_VERSION }}

- name: Run PHPUnit with coverage
run: |
mkdir -p mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
if: ${{ matrix.php-version == '8.1' }}
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}

- name: Upload coverage report to Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.php-version == '8.1' }}
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}

0 comments on commit 5f591ed

Please sign in to comment.