Skip to content

Commit 28f2ee7

Browse files
authored
Split actions (#7)
* Split actions * Upload coverage html * Rename
1 parent c784e49 commit 28f2ee7

File tree

3 files changed

+75
-7
lines changed

3 files changed

+75
-7
lines changed

.github/workflows/run-coverage.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
php-tests:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
php: [8.1]
16+
17+
name: PHP Code Coverage
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v1
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: 8.1
27+
extensions: mbstring
28+
coverage: pcov
29+
30+
- name: Install dependencies
31+
run: |
32+
composer update --prefer-dist --no-interaction --no-suggest --with-all-dependencies
33+
34+
- name: Check Code Coverage
35+
run: vendor/bin/phpunit --verbose --coverage-text --coverage-clover=clover.xml --coverage-html=coverage
36+
37+
- uses: actions/upload-artifact@v2
38+
with:
39+
name: coverage
40+
path: coverage

.github/workflows/run-matcher.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
php-tests:
11+
runs-on: ubuntu-latest
12+
13+
name: PHPUnit Matcher
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v1
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: 8.1
23+
extensions: mbstring
24+
25+
- name: Configure matchers
26+
uses: mheap/phpunit-matcher-action@v1
27+
28+
- name: Install dependencies
29+
run: |
30+
composer update --prefer-dist --no-interaction --no-suggest --with-all-dependencies
31+
32+
- name: Execute Unit Tests
33+
run: vendor/bin/phpunit --teamcity

.github/workflows/run-tests.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
with:
3636
php-version: ${{ matrix.php }}
3737
extensions: mbstring
38-
coverage: pcov
3938

4039
- name: Configure matchers
4140
uses: mheap/phpunit-matcher-action@v1
@@ -46,16 +45,12 @@ jobs:
4645
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest --with-all-dependencies
4746
4847
- name: Execute Unit Tests
49-
run: vendor/bin/phpunit --teamcity
48+
run: composer test
5049

5150
- name: Analyse with PHPStan
5251
run: composer analyse
5352
if: matrix.os == 'ubuntu-latest' && matrix.symfony != '4.x'
5453

5554
- name: Check PSR-12 Codestyle
5655
run: composer test
57-
if: matrix.os == 'ubuntu-latest'
58-
59-
- name: Check Code Coverage
60-
run: vendor/bin/phpunit --verbose --coverage-text
61-
if: matrix.dependency-version == 'prefer-stable' && matrix.php == '8.1'
56+
if: matrix.os == 'ubuntu-latest'

0 commit comments

Comments
 (0)