Skip to content

Commit

Permalink
Merge pull request #180 from Yoast/feature/1.x-ghactions-use-nightly-…
Browse files Browse the repository at this point in the history
…for-php-next

GH Actions: use "nightly" instead of version nr for PHP-dev
  • Loading branch information
jrfnl committed Aug 30, 2024
2 parents f3a7fbd + 3496c57 commit df04f30
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:

strategy:
matrix:
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', 'nightly']

continue-on-error: ${{ matrix.php == '8.4' }}
continue-on-error: ${{ matrix.php == 'nightly' }}

name: "Lint: PHP ${{ matrix.php }}"

Expand All @@ -47,22 +47,22 @@ jobs:
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies - normal
if: matrix.php != '8.4'
if: matrix.php != 'nightly'
uses: "ramsey/composer-install@v3"
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Install Composer dependencies - ignore PHP restrictions
if: matrix.php == '8.4'
if: matrix.php == 'nightly'
uses: "ramsey/composer-install@v3"
with:
composer-options: --ignore-platform-req=php+
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

- name: "Lint PHP files against parse errors - PHP < 7.0"
if: ${{ matrix.php < 7.0 }}
if: ${{ matrix.php != 'nightly' && matrix.php < 7.0 }}
run: composer lint-lt70

- name: "Lint PHP files against parse errors - PHP 7.0"
Expand All @@ -74,9 +74,9 @@ jobs:
run: composer lint7

- name: "Lint PHP files against parse errors - PHP 8.0 - 8.3"
if: ${{ matrix.php >= 8.0 && matrix.php < 8.4 }}
if: ${{ matrix.php != 'nightly' && matrix.php >= 8.0 && matrix.php < 8.4 }}
run: composer lint-gte80

- name: "Lint PHP files against parse errors - PHP >= 8.4"
if: ${{ matrix.php >= 8.4 }}
if: ${{ matrix.php == 'nightly' || matrix.php >= 8.4 }}
run: composer lint-gte84
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
experimental: false

# Experimental builds.
- php: '8.4'
- php: 'nightly'
phpunit: 'auto' # PHPUnit 9.x.
coverage: false
experimental: true
Expand Down Expand Up @@ -115,14 +115,14 @@ jobs:
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies - normal
if: matrix.php < '8.3'
if: matrix.php != 'nightly'
uses: "ramsey/composer-install@v3"
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Install Composer dependencies - ignore PHP restrictions
if: matrix.php >= '8.3'
if: matrix.php == 'nightly'
uses: "ramsey/composer-install@v3"
with:
composer-options: --ignore-platform-req=php+
Expand Down Expand Up @@ -259,12 +259,12 @@ jobs:
coverage: true

# Experimental builds.
- php: '8.4'
- php: 'nightly'
phpunit: '9'

name: "PHAR test: PHP ${{ matrix.php }} - PHPUnit: ${{matrix.phpunit}}"

continue-on-error: ${{ matrix.php == '8.4' }}
continue-on-error: ${{ matrix.php == 'nightly' }}

steps:
- name: Checkout code
Expand All @@ -291,15 +291,15 @@ jobs:
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies - normal
if: matrix.php < '8.3'
if: matrix.php != 'nightly'
uses: "ramsey/composer-install@v3"
with:
composer-options: "--no-dev"
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Install Composer dependencies - ignore PHP restrictions
if: matrix.php >= '8.3'
if: matrix.php == 'nightly'
uses: "ramsey/composer-install@v3"
with:
composer-options: "--no-dev --ignore-platform-req=php+"
Expand Down

0 comments on commit df04f30

Please sign in to comment.