-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from boesing/qa/laminas-continous-integration
- Loading branch information
Showing
2 changed files
with
27 additions
and
93 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,98 +1,31 @@ | ||
name: CI Pipeline | ||
name: "Continuous Integration" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'refs/pull/*' | ||
|
||
jobs: | ||
|
||
coding-standard: | ||
|
||
name: "Coding Standard" | ||
|
||
runs-on: "${{ matrix.operating-system }}" | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-version: ['7.4'] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: "composer:v2" | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader | ||
|
||
- name: Check codestyle | ||
run: vendor/bin/phpcs -s | ||
|
||
static-analysis: | ||
name: "Static Analysis" | ||
runs-on: "${{ matrix.operating-system }}" | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php-version: ['7.4'] | ||
operating-system: ['ubuntu-latest'] | ||
|
||
matrix: | ||
name: Generate job matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: "composer:v2" | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader | ||
|
||
- name: Analyze code with static-analysis | ||
run: vendor/bin/psalm --shepherd | ||
|
||
unit-tests: | ||
name: "Unit Tests" | ||
|
||
runs-on: "${{ matrix.operating-system }}" | ||
continue-on-error: "${{ matrix.experimental }}" | ||
|
||
- name: Gather CI configuration | ||
id: matrix | ||
uses: laminas/laminas-ci-matrix-action@v1 | ||
|
||
qa: | ||
name: QA Checks | ||
needs: [matrix] | ||
runs-on: ${{ matrix.operatingSystem }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: ["7.3", "7.4", "8.0"] | ||
operating-system: ["ubuntu-latest", "macos-latest"] | ||
experimental: [false] | ||
composer-dependencies: ['lowest', 'latest'] | ||
|
||
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: "composer:v2" | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-options }} | ||
|
||
- name: Ensure lowest dependencies | ||
if: ${{ matrix.composer-dependencies == 'lowest' }} | ||
run: composer update --no-progress --prefer-dist --prefer-lowest ${{ matrix.composer-options }} | ||
|
||
- name: Execute tests | ||
run: vendor/bin/phpunit --colors=always --coverage-clover=build/coverage-clover.xml --coverage-xml=build/coverage-xml --log-junit build/coverage-junit.xml --coverage-text | ||
|
||
- name: "Publish Coverage Report to Codecov" | ||
uses: "codecov/codecov-action@v1" | ||
- name: ${{ matrix.name }} | ||
uses: laminas/laminas-continuous-integration-action@v1 | ||
with: | ||
file: ./build/coverage-clover.xml | ||
job: ${{ matrix.job }} |
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