-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Drop
laminas-continuous-integration-action
, add jobs static Co…
…nfig
- Loading branch information
Showing
1 changed file
with
97 additions
and
26 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,36 +1,107 @@ | ||
# See https://github.com/laminas/laminas-continuous-integration-action | ||
# Generates a job matrix based on current dependencies and supported version | ||
# ranges, then runs all those jobs | ||
name: "Continuous Integration" | ||
name: "CI" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
env: | ||
PHP_CURRENT: "8.2" | ||
PHP_NEXT: "8.3" | ||
|
||
jobs: | ||
matrix: | ||
name: Generate job matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.matrix.outputs.matrix }} | ||
composer-json-lint: | ||
name: "Lint composer.json" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ env.PHP_CURRENT }}" | ||
ini-values: "${{ env.INI_VALUES }}" | ||
tools: composer-normalize, composer-require-checker | ||
- uses: "ramsey/composer-install@v3" | ||
|
||
- run: "composer validate --strict" | ||
- run: "composer-normalize --dry-run" | ||
|
||
coding-standards: | ||
name: "Coding Standards" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: Gather CI configuration | ||
id: matrix | ||
uses: laminas/[email protected] | ||
|
||
qa: | ||
name: QA Checks | ||
needs: [ matrix ] | ||
runs-on: ${{ matrix.operatingSystem }} | ||
- uses: "actions/checkout@v4" | ||
- uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ env.PHP_CURRENT }}" | ||
ini-values: "${{ env.INI_VALUES }}" | ||
tools: cs2pr | ||
- uses: "ramsey/composer-install@v3" | ||
|
||
- run: "vendor/bin/phpcs -q --report=checkstyle | cs2pr" | ||
|
||
static-analysis: | ||
name: "Static Analysis" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ env.PHP_CURRENT }}" | ||
ini-values: "${{ env.INI_VALUES }}" | ||
- uses: "ramsey/composer-install@v3" | ||
|
||
- run: "vendor/bin/psalm --shepherd --stats --output-format=github --no-cache" | ||
|
||
tests: | ||
name: "Tests" | ||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }} | ||
matrix: | ||
php-version: | ||
- "8.2" | ||
- "8.3" | ||
dependencies: | ||
- "lowest" | ||
- "locked" | ||
- "highest" | ||
|
||
steps: | ||
- name: ${{ matrix.name }} | ||
uses: laminas/[email protected] | ||
env: | ||
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }} | ||
"INFECTION_DASHBOARD_API_KEY": ${{ secrets.INFECTION_DASHBOARD_API_KEY }} | ||
"STRYKER_DASHBOARD_API_KEY": ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
- uses: "actions/checkout@v4" | ||
- uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: "${{ env.INI_VALUES }}" | ||
- uses: "ramsey/composer-install@v3" | ||
with: | ||
job: ${{ matrix.job }} | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run tests" | ||
timeout-minutes: 3 | ||
run: "vendor/bin/phpunit --no-coverage --no-logging" | ||
|
||
code-coverage: | ||
name: "Code Coverage" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ env.PHP_CURRENT }}" | ||
ini-values: "${{ env.INI_VALUES }}" | ||
- uses: "ramsey/composer-install@v3" | ||
|
||
- name: "Run Infection" | ||
timeout-minutes: 30 | ||
run: "vendor/bin/infection run --ansi --threads=$(nproc)" | ||
env: | ||
INFECTION_DASHBOARD_API_KEY: "${{ secrets.INFECTION_DASHBOARD_API_KEY }}" | ||
STRYKER_DASHBOARD_API_KEY: "${{ secrets.STRYKER_DASHBOARD_API_KEY }}" |