Skip to content

GH Actions: various tweaks / PHP 8.2 not allowed to fail #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: 'latest'
coverage: none
tools: cs2pr

Expand All @@ -50,8 +50,8 @@ jobs:
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

# @link http://xmlsoft.org/xmllint.html
- name: Install xmllint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ jobs:
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Lint against parse errors (PHP 7.2+)
if: ${{ matrix.phpcs_version == 'dev-master' && matrix.php >= '7.2' }}
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ jobs:
# - PHP 7.4 needs PHPCS 3.5.0+ to run without errors.
# - PHP 8.0 needs PHPCS 3.5.7+ to run without errors.
# - PHP 8.1 needs PHPCS 3.6.1+ to run without errors.
# - PHP 8.2 needs PHPCS 3.6.1+ to run without errors.
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2']
phpcs_version: ['3.1.0', 'dev-master']

include:
# Complete the matrix, while preventing issues with PHPCS versions incompatible with certain PHP versions.
- php: '8.2'
phpcs_version: 'dev-master'
- php: '8.2'
phpcs_version: '3.6.1'

- php: '8.1'
phpcs_version: 'dev-master'
- php: '8.1'
Expand All @@ -59,12 +65,12 @@ jobs:
- php: '7.4'
phpcs_version: '4.0.x-dev'

- php: '8.2' # Nightly.
- php: '8.3' # Nightly.
phpcs_version: 'dev-master'

name: "Test${{ matrix.phpcs_version == 'dev-master' && ' + Lint' || '' }}: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}"

continue-on-error: ${{ matrix.php == '8.2' || matrix.phpcs_version == '4.0.x-dev' }}
continue-on-error: ${{ matrix.php == '8.3' || matrix.phpcs_version == '4.0.x-dev' }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -104,19 +110,19 @@ jobs:
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies - normal
if: ${{ matrix.php < 8.2 }}
if: ${{ matrix.php < 8.3 }}
uses: "ramsey/composer-install@v2"
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")

# For PHP "nightly", we need to install with ignore platform reqs as not all dependencies allow installation.
- name: Install Composer dependencies - with ignore platform
if: ${{ matrix.php >= 8.2 }}
if: ${{ matrix.php >= 8.3 }}
uses: "ramsey/composer-install@v2"
with:
composer-options: --ignore-platform-reqs
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Lint against parse errors (PHP 7.2+)
if: ${{ matrix.phpcs_version == 'dev-master' && matrix.php >= '7.2' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: 'latest'
ini-values: error_reporting=-1, display_errors=On, log_errors_max_len=0
coverage: none

Expand Down