Refactor and clean up CI config #192
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions | |
name: CI | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- master | |
jobs: | |
coding-standards: | |
name: Coding Standards | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/[email protected] | |
with: | |
php-version: '8.3' | |
coverage: none | |
extensions: mbstring | |
tools: composer-normalize, php-cs-fixer | |
- name: Validate composer.json | |
run: >- | |
composer validate --strict | |
- name: Normalize composer.json | |
run: >- | |
composer-normalize --dry-run | |
- name: Check code style | |
run: >- | |
php-cs-fixer check | |
static-code-analysis: | |
name: Static Code Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/[email protected] | |
with: | |
php-version: '8.3' | |
coverage: none | |
extensions: mbstring | |
- name: Install dependencies | |
run: >- | |
composer install | |
- name: Install tools | |
run: >- | |
composer run install-tools | |
- name: Run static analysis | |
run: >- | |
composer run static-analysis | |
roave-backwards-compatibility-check: | |
name: Roave Backwards Compatibility Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check backwards compatibility | |
uses: docker://nyholm/roave-bc-check-ga | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.2" | |
- "7.3" | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/[email protected] | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: "${{ matrix.php-version }}" | |
- name: Install dependencies with composer | |
run: "composer update --no-interaction --no-progress" | |
- name: Run unit tests | |
run: "vendor/bin/phpunit" | |
windows-tests: | |
name: Windows tests | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP | |
uses: shivammathur/[email protected] | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: "${{ matrix.php-version }}" | |
- name: Install dependencies with composer | |
run: "composer update --no-interaction --no-progress" | |
- name: Run unit tests | |
run: "vendor/bin/phpunit tests/AssertTest.php" |