Skip to content

Commit 81ad118

Browse files
authored
[ci] housekeeping (#255)
1 parent 1aaf7b1 commit 81ad118

File tree

4 files changed

+114
-85
lines changed

4 files changed

+114
-85
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,55 @@
1-
name: Bundle CI
1+
name: PHPUnit
22
on:
3-
push:
4-
branches: ['main']
5-
pull_request:
6-
schedule:
7-
- cron: '0 */12 * * *'
3+
push:
4+
branches: ['main']
5+
pull_request:
6+
schedule:
7+
- cron: '0 */12 * * *'
88

99
jobs:
10-
static-analysis:
11-
name: Static Analysis
12-
runs-on: ubuntu-18.04
13-
14-
steps:
15-
- name: "Checkout code"
16-
uses: "actions/checkout@v2"
17-
18-
- name: "Install PHP"
19-
uses: "shivammathur/setup-php@v2"
20-
with:
21-
coverage: "none"
22-
php-version: "8.0"
23-
24-
- name: "Validate composer.json"
25-
run: "composer validate --strict --no-check-lock"
26-
27-
- name: "Composer install"
28-
uses: "ramsey/composer-install@v1"
29-
with:
30-
composer-options: "--prefer-stable"
31-
dependency-versions: 'highest'
32-
33-
- name: Install PHP-CS-Fixer
34-
run: composer global require friendsofphp/php-cs-fixer --prefer-dist --no-progress
35-
36-
- name: Running Pslam
37-
run: vendor/bin/psalm -c $GITHUB_WORKSPACE/psalm.xml --php-version=8.0
38-
39-
- name: Running php-cs-fixer
40-
run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config $GITHUB_WORKSPACE/.php-cs-fixer.dist.php --diff --dry-run
41-
42-
tests:
43-
name: "Tests ${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}"
44-
runs-on: ubuntu-18.04
45-
46-
strategy:
47-
fail-fast: false
48-
matrix:
49-
# normal, highest, non-dev installs
50-
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1']
51-
composer-options: ['--prefer-stable']
52-
dependency-versions: ['highest']
53-
include:
54-
# testing lowest PHP version with lowest dependencies
55-
- php-version: '7.2.5'
56-
dependency-versions: 'lowest'
57-
composer-options: '--prefer-lowest'
58-
59-
# testing dev versions with highest PHP
60-
- php-version: '8.0'
61-
dependency-versions: 'highest'
62-
composer-options: '' # allow dev deps
63-
64-
steps:
65-
- name: "Checkout code"
66-
uses: "actions/checkout@v2"
67-
68-
- name: "Install PHP"
69-
uses: "shivammathur/setup-php@v2"
70-
with:
71-
coverage: "none"
72-
php-version: "${{ matrix.php-version }}"
73-
74-
- name: "Composer install"
75-
uses: "ramsey/composer-install@v1"
76-
with:
77-
dependency-versions: "${{ matrix.dependency-versions }}"
78-
composer-options: "--prefer-dist --no-progress"
79-
80-
- name: Unit Tests
81-
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit
82-
83-
- name: Functional Tests
84-
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional
85-
86-
- name: Integration Tests
87-
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration
10+
tests:
11+
name: "${{ matrix.php-version }} ${{ matrix.dependency-versions }} deps ${{ matrix.dependency-versions }}"
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# normal, highest, non-dev installs
18+
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
19+
composer-options: ['--prefer-stable']
20+
dependency-versions: ['highest']
21+
include:
22+
# testing lowest PHP version with lowest dependencies
23+
- php-version: '7.2.5'
24+
dependency-versions: 'lowest'
25+
composer-options: '--prefer-lowest'
26+
27+
# testing dev versions with highest PHP
28+
- php-version: '8.2'
29+
dependency-versions: 'highest'
30+
composer-options: '' # allow dev deps
31+
32+
steps:
33+
- name: "Checkout code"
34+
uses: "actions/checkout@v3"
35+
36+
- name: "Install PHP"
37+
uses: "shivammathur/setup-php@v2"
38+
with:
39+
coverage: "none"
40+
php-version: "${{ matrix.php-version }}"
41+
42+
- name: "Composer install"
43+
uses: "ramsey/composer-install@v1"
44+
with:
45+
dependency-versions: "${{ matrix.dependency-versions }}"
46+
composer-options: "--prefer-dist --no-progress"
47+
48+
- name: Unit Tests
49+
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite unit
50+
51+
- name: Functional Tests
52+
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite functional
53+
54+
- name: Integration Tests
55+
run: vendor/bin/simple-phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --testsuite integration

.github/workflows/static.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Static
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
release:
9+
10+
jobs:
11+
composer-validate:
12+
name: Validate composer.json
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Validate
20+
run: composer validate --strict
21+
22+
php-cs-fixer:
23+
name: PHP-CS-Fixer
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: '8.1'
34+
tools: php-cs-fixer
35+
36+
- name: Run PHP-CS-Fixer
37+
run: php-cs-fixer fix --dry-run --diff
38+
39+
psalm:
40+
name: Psalm
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v3
46+
47+
- name: Setup PHP
48+
uses: shivammathur/setup-php@v2
49+
with:
50+
php-version: '8.2'
51+
tools: psalm:4
52+
53+
- name: Install Composer dependencies
54+
run: composer install --no-progress --prefer-dist --optimize-autoloader
55+
56+
- name: Run Psalm
57+
run: psalm --output-format=github --php-version=8.0 -c $GITHUB_WORKSPACE/psalm.xml

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"doctrine/orm": "^2.7",
1717
"symfony/framework-bundle": "^5.4 | ^6.0",
1818
"symfony/phpunit-bridge": "^5.4 | ^6.0",
19-
"vimeo/psalm": "^4.3",
2019
"doctrine/doctrine-bundle": "^2.0.3"
2120
},
2221
"conflict": {

psalm.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,10 @@
7171
<file name="src/Persistence/Fake/FakeResetPasswordInternalRepository.php"/>
7272
</errorLevel>
7373
</InvalidReturnType>
74+
<TooManyArguments>
75+
<errorLevel type="suppress">
76+
<file name="src/Model/ResetPasswordToken.php"/>
77+
</errorLevel>
78+
</TooManyArguments>
7479
</issueHandlers>
7580
</psalm>

0 commit comments

Comments
 (0)