Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/csqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:

jobs:
checkcs:
name: 'PHP: 7.4 | Basic CS and QA checks'
name: 'Basic CS and QA checks'
runs-on: ubuntu-latest

env:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: 'latest'
coverage: none
tools: cs2pr

Expand All @@ -44,8 +44,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: Install xmllint
run: |
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: cs2pr ./phpcs-report.xml

static-analysis:
name: "PHP: 7.4 | Static Analysis"
name: "PHPStan & Psalm"
runs-on: ubuntu-latest

steps:
Expand All @@ -85,7 +85,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: 'latest'
coverage: none

# Install dependencies and handle caching in one go.
Expand All @@ -94,8 +94,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: Run Static Analysis
run: composer static-analysis
26 changes: 16 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ jobs:
# - PHPCS will run without errors on PHP 5.4 - 7.4 on all supported PHPCS versions.
# - 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.
#
# The matrix is set up so as not to duplicate the builds which are run for code coverage.
php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3']
phpcs_version: ['3.5.6', 'dev-master']

include:
# Make the matrix complete without duplicating builds run in code coverage.
- php: '8.2'
phpcs_version: '3.6.1'

- php: '8.1'
phpcs_version: 'dev-master'
- php: '8.1'
phpcs_version: '3.6.1'

Expand All @@ -48,12 +54,12 @@ jobs:
phpcs_version: 'dev-master'

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

name: "Test: PHP ${{ matrix.php }} on PHPCS ${{ matrix.phpcs_version }}"

continue-on-error: ${{ matrix.php == '8.2' }}
continue-on-error: ${{ matrix.php == '8.3' }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -87,19 +93,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 the PHP "nightly", we need to install with ignore platform reqs as not all dependencies allow it yet.
- 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-req=php
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Run the unit tests
run: composer test
Expand All @@ -115,7 +121,7 @@ jobs:
strategy:
matrix:
include:
- php: '8.1'
- php: '8.2'
phpcs_version: 'dev-master'
- php: '7.4'
phpcs_version: '3.5.6'
Expand Down Expand Up @@ -158,8 +164,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: Grab PHPUnit version
id: phpunit_version
Expand Down