Skip to content

Commit cf5642a

Browse files
Run code coverage in separate workflow (#20)
1 parent b4aa27e commit cf5642a

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

.github/workflows/php.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,3 @@ jobs:
4444

4545
- name: Run unit tests
4646
run: ./vendor/bin/phpunit --testdox
47-
48-
coverage:
49-
runs-on: ubuntu-latest
50-
51-
steps:
52-
- uses: actions/checkout@v1
53-
54-
- name: Setup PHP
55-
uses: shivammathur/setup-php@v1
56-
with:
57-
php-version: 7.4
58-
extensions: mbstring, intl, json
59-
coverage: pcov
60-
61-
- name: Install dependencies
62-
run: composer install --prefer-dist --no-progress --no-suggest
63-
64-
- name: Test & publish code coverage
65-
uses: paambaati/codeclimate-action@v2.3.0
66-
env:
67-
CC_TEST_REPORTER_ID: ${{ secrets.codeClimateReporterID }}
68-
with:
69-
coverageCommand: ./vendor/bin/phpunit --coverage-clover=clover.xml
70-
debug: true

.github/workflows/php_coverage.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Code coverage
2+
3+
on:
4+
push:
5+
branches:
6+
7+
jobs:
8+
coverage:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v1
16+
with:
17+
php-version: 7.4
18+
extensions: mbstring, intl, json
19+
coverage: pcov
20+
21+
- name: Install dependencies
22+
run: composer install --prefer-dist --no-progress --no-suggest
23+
24+
- name: Test & publish code coverage
25+
uses: paambaati/codeclimate-action@v2.3.0
26+
env:
27+
CC_TEST_REPORTER_ID: ${{ secrets.codeClimateReporterID }}
28+
with:
29+
coverageCommand: ./vendor/bin/phpunit --coverage-clover=clover.xml
30+
debug: true

0 commit comments

Comments
 (0)