Skip to content

Commit 4b576a8

Browse files
committed
Split workflow & update actions versions
1 parent a24d66d commit 4b576a8

File tree

2 files changed

+60
-50
lines changed

2 files changed

+60
-50
lines changed

.github/workflows/code-quality.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 8 * * *'
9+
10+
jobs:
11+
php-cs-fixer:
12+
runs-on: ubuntu-latest
13+
name: Coding Standards
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.1'
22+
coverage: none
23+
tools: php-cs-fixer, cs2pr
24+
25+
- name: Run PHP CS Fixer
26+
run: php-cs-fixer fix --dry-run --format checkstyle | cs2pr
27+
28+
phpstan:
29+
runs-on: ubuntu-latest
30+
name: Static Analysis
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: '8.1'
39+
coverage: none
40+
tools: phpstan
41+
42+
- name: Install Dependencies
43+
uses: ramsey/composer-install@v2
44+
with:
45+
composer-options: '--prefer-dist'
46+
47+
- name: Install PHPUnit Dependencies
48+
run: vendor/bin/simple-phpunit install
49+
50+
- name: Run PHPStan
51+
run: phpstan analyse --no-progress

.github/workflows/ci.yaml renamed to .github/workflows/tests.yaml

+9-50
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Tests
22

33
on:
44
push:
@@ -8,48 +8,6 @@ on:
88
- cron: '0 8 * * *'
99

1010
jobs:
11-
php-cs-fixer:
12-
runs-on: ubuntu-latest
13-
name: Coding Standards
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
18-
- name: Setup PHP
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: '8.1'
22-
coverage: none
23-
tools: php-cs-fixer, cs2pr
24-
25-
- name: PHP Coding Standards Fixer
26-
run: php-cs-fixer fix --dry-run --format checkstyle | cs2pr
27-
28-
phpstan:
29-
runs-on: ubuntu-latest
30-
name: Static Analysis
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v3
34-
35-
- name: Setup PHP
36-
uses: shivammathur/setup-php@v2
37-
with:
38-
php-version: '8.1'
39-
coverage: none
40-
tools: phpstan
41-
42-
- name: Install dependencies
43-
uses: ramsey/composer-install@v2
44-
with:
45-
composer-options: '--prefer-dist'
46-
47-
- name: Install PHPUnit dependencies
48-
run: vendor/bin/simple-phpunit install
49-
50-
- name: PHPStan
51-
run: phpstan analyse --no-progress
52-
5311
phpunit:
5412
runs-on: ubuntu-latest
5513
strategy:
@@ -152,7 +110,7 @@ jobs:
152110
name: PHP ${{ matrix.php }} & Symfony ${{ matrix.symfony }}${{ matrix.dependencies == 'lowest' && ' (lowest)' || '' }} Test
153111
steps:
154112
- name: Checkout
155-
uses: actions/checkout@v3
113+
uses: actions/checkout@v4
156114

157115
- name: Setup PHP
158116
uses: shivammathur/setup-php@v2
@@ -161,27 +119,28 @@ jobs:
161119
ini-values: zend.exception_ignore_args=false
162120
tools: flex
163121

164-
- name: Install dependencies
122+
- name: Install Dependencies
165123
uses: ramsey/composer-install@v2
166124
with:
167125
composer-options: '--prefer-dist'
168126
dependency-versions: ${{ matrix.dependencies }}
169127

170-
- name: Install PHPUnit dependencies
128+
- name: Install PHPUnit Dependencies
171129
run: vendor/bin/simple-phpunit install
172130

173-
- name: Run tests with Doctrine Annotations
131+
- name: Run PHPUnit with Doctrine Annotations
174132
run: vendor/bin/simple-phpunit -v --coverage-text --coverage-clover=coverage-annotations.xml
175133

176134
- name: Remove Doctrine Annotations
177135
run: composer remove --dev doctrine/annotations
178136

179-
- name: Run tests without Doctrine Annotations
137+
- name: Run PHPUnit without Doctrine Annotations
180138
run: vendor/bin/simple-phpunit -v --coverage-text --coverage-clover=coverage-no-annotations.xml
181139

182-
- name: Upload coverage to Codecov
140+
- name: Upload Coverage to Codecov
183141
if: ${{ success() }}
184-
uses: codecov/codecov-action@v3
142+
uses: codecov/codecov-action@v4
185143
with:
186144
files: coverage-annotations.xml,coverage-no-annotations.xml
187145
flags: ${{ matrix.php }}
146+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)