Skip to content

Commit

Permalink
Use env var for latest stable PHP version
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Aug 5, 2023
1 parent 04a6c06 commit f43d8e1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
pull_request:

env:
LATEST_STABLE_PHP_VERSION: "8.2"

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

- name: Install composer dependencies
uses: "ramsey/composer-install@v1"
Expand Down Expand Up @@ -56,15 +59,15 @@ jobs:
run: vendor/bin/phpunit
env:
CALCULATOR: ${{ matrix.calculator }}
if: ${{ matrix.php-version != '8.2' }}
if: ${{ matrix.php-version != env.LATEST_STABLE_PHP_VERSION }}

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

- name: Run PHPUnit with bcscale()
run: vendor/bin/phpunit
Expand All @@ -77,4 +80,4 @@ jobs:
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.php-version == '8.2' }}
if: ${{ matrix.php-version == env.LATEST_STABLE_PHP_VERSION }}

0 comments on commit f43d8e1

Please sign in to comment.