Skip to content

Commit 56a8992

Browse files
authored
Merge pull request #36 from boesing/qa/laminas-continous-integration
2 parents 99d56ca + fae42c4 commit 56a8992

File tree

2 files changed

+27
-93
lines changed

2 files changed

+27
-93
lines changed
Lines changed: 22 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,31 @@
1-
name: CI Pipeline
1+
name: "Continuous Integration"
2+
23
on:
34
pull_request:
5+
push:
6+
branches:
7+
- 'refs/pull/*'
48

59
jobs:
6-
7-
coding-standard:
8-
9-
name: "Coding Standard"
10-
11-
runs-on: "${{ matrix.operating-system }}"
12-
13-
strategy:
14-
fail-fast: true
15-
matrix:
16-
operating-system: ['ubuntu-latest']
17-
php-version: ['7.4']
18-
19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v2
22-
23-
- name: Setup PHP
24-
uses: shivammathur/setup-php@v2
25-
with:
26-
php-version: ${{ matrix.php-version }}
27-
tools: "composer:v2"
28-
29-
- name: Install dependencies
30-
run: composer install --no-progress --prefer-dist --optimize-autoloader
31-
32-
- name: Check codestyle
33-
run: vendor/bin/phpcs -s
34-
35-
static-analysis:
36-
name: "Static Analysis"
37-
runs-on: "${{ matrix.operating-system }}"
38-
39-
strategy:
40-
fail-fast: true
41-
matrix:
42-
php-version: ['7.4']
43-
operating-system: ['ubuntu-latest']
44-
10+
matrix:
11+
name: Generate job matrix
12+
runs-on: ubuntu-latest
13+
outputs:
14+
matrix: ${{ steps.matrix.outputs.matrix }}
4515
steps:
46-
- name: Checkout
47-
uses: actions/checkout@v2
48-
49-
- name: Setup PHP
50-
uses: shivammathur/setup-php@v2
51-
with:
52-
php-version: ${{ matrix.php-version }}
53-
tools: "composer:v2"
54-
55-
- name: Install dependencies
56-
run: composer install --no-progress --prefer-dist --optimize-autoloader
57-
58-
- name: Analyze code with static-analysis
59-
run: vendor/bin/psalm --shepherd
60-
61-
unit-tests:
62-
name: "Unit Tests"
63-
64-
runs-on: "${{ matrix.operating-system }}"
65-
continue-on-error: "${{ matrix.experimental }}"
66-
16+
- name: Gather CI configuration
17+
id: matrix
18+
uses: laminas/laminas-ci-matrix-action@v1
19+
20+
qa:
21+
name: QA Checks
22+
needs: [matrix]
23+
runs-on: ${{ matrix.operatingSystem }}
6724
strategy:
6825
fail-fast: false
69-
matrix:
70-
php-version: ["7.3", "7.4", "8.0"]
71-
operating-system: ["ubuntu-latest", "macos-latest"]
72-
experimental: [false]
73-
composer-dependencies: ['lowest', 'latest']
74-
26+
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
7527
steps:
76-
- name: Checkout
77-
uses: actions/checkout@v2
78-
79-
- name: Setup PHP
80-
uses: shivammathur/setup-php@v2
81-
with:
82-
php-version: ${{ matrix.php-version }}
83-
tools: "composer:v2"
84-
85-
- name: Install dependencies
86-
run: composer install --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-options }}
87-
88-
- name: Ensure lowest dependencies
89-
if: ${{ matrix.composer-dependencies == 'lowest' }}
90-
run: composer update --no-progress --prefer-dist --prefer-lowest ${{ matrix.composer-options }}
91-
92-
- name: Execute tests
93-
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
94-
95-
- name: "Publish Coverage Report to Codecov"
96-
uses: "codecov/codecov-action@v1"
28+
- name: ${{ matrix.name }}
29+
uses: laminas/laminas-continuous-integration-action@v1
9730
with:
98-
file: ./build/coverage-clover.xml
31+
job: ${{ matrix.job }}

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
"doctrine/coding-standard": "^8.1",
1313
"lcobucci/clock": "^1.2",
1414
"phpunit/phpunit": "^9.2",
15-
"psalm/plugin-phpunit": "^0.12.2",
16-
"vimeo/psalm": "^4.0"
15+
"psalm/plugin-phpunit": "^0.15.1",
16+
"vimeo/psalm": "^4.6"
17+
},
18+
"conflict": {
19+
"vimeo/psalm": "4.6.2"
1720
},
1821
"config": {
1922
"preferred-install": "dist",
@@ -29,8 +32,6 @@
2932
"Boesing\\TypedArrays\\": "tests/"
3033
}
3134
},
32-
"minimum-stability": "dev",
33-
"prefer-stable": true,
3435
"scripts": {
3536
"cs-check": "phpcs",
3637
"cs-fix": "phpcbf",

0 commit comments

Comments
 (0)