-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and clean up CI config (#304)
- Loading branch information
1 parent
4c45030
commit 8164e8e
Showing
24 changed files
with
8,204 additions
and
1,079 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,140 +1,113 @@ | ||
# https://docs.github.com/en/actions | ||
|
||
name: "CI" | ||
name: CI | ||
|
||
on: | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- "master" | ||
|
||
env: | ||
COMPOSER_ROOT_VERSION: 1.99 | ||
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: | ||
coverage: "none" | ||
extensions: "mbstring" | ||
php-version: "7.4" | ||
tools: "composer-normalize" | ||
|
||
- name: "Validate composer.json" | ||
run: "composer validate --strict" | ||
|
||
- name: "Normalize composer.json" | ||
run: "composer-normalize --dry-run" | ||
|
||
- name: "PHP-CS-Fixer" | ||
uses: "docker://oskarstark/php-cs-fixer-ga:2.18.0" | ||
with: | ||
args: "--dry-run --diff-format udiff" | ||
|
||
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: | ||
coverage: "none" | ||
extensions: "mbstring" | ||
php-version: "7.4" | ||
|
||
- name: "Install dependencies with composer" | ||
run: "composer update --no-interaction --no-progress && composer i --working-dir=ci" | ||
|
||
- name: "Run vimeo/psalm" | ||
run: "ci/vendor/bin/psalm --threads=4" | ||
|
||
roave-bc-check: | ||
name: "Roave BC Check" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/[email protected]" | ||
|
||
- name: "Install Roave BC check" | ||
run: "composer require --dev roave/backward-compatibility-check" | ||
|
||
- name: "Run Roave BC check" | ||
run: "vendor/bin/roave-backward-compatibility-check" | ||
|
||
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" | ||
static-code-analysis: | ||
name: Static Code Analysis | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
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 code style check | ||
run: >- | ||
composer run cs-check | ||
- name: Run backwards compatibility check | ||
run: >- | ||
composer run bc-check | ||
- name: Run static analysis | ||
run: >- | ||
composer run static-analysis | ||
tests: | ||
name: Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
- "8.2" | ||
- "8.3" | ||
- "8.4" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: none | ||
extensions: mbstring | ||
tools: phpunit:8 | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run unit tests | ||
run: phpunit | ||
|
||
windows-tests: | ||
name: Windows tests | ||
|
||
runs-on: windows-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
- "8.3" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: none | ||
extensions: mbstring | ||
tools: phpunit:8 | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run unit tests | ||
run: phpunit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
vendor/ | ||
/composer.lock | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache | ||
.php_cs.cache |
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
totallyTyped="true" | ||
errorLevel="8" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config ci/vendor/vimeo/psalm/config.xsd" | ||
phpVersion="7.3" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
> | ||
<projectFiles> | ||
<directory name="bin" /> | ||
<directory name="bin"/> | ||
<directory name="tests/static-analysis" /> | ||
<ignoreFiles> | ||
<directory name="ci"/> | ||
</ignoreFiles> | ||
</projectFiles> | ||
|
||
</psalm> |
Oops, something went wrong.