Skip to content

Commit 5df13fb

Browse files
authored
Single artifact coverage (#14)
* Try to have one artifact with coverages from all php versions * test each week + use datetime in filename for coverage * test php 8.2 * remove test for php 8.2-nightly again (phpunit not ready)
1 parent 9184c28 commit 5df13fb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Tests
33
on:
44
push:
55
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
# “At 17:45 on Friday.”
9+
- cron: '45 17 * * 5'
610

711
jobs:
812
build:
@@ -28,14 +32,15 @@ jobs:
2832

2933
- name: Run test suite
3034
run: |
31-
mkdir ./coverage
32-
php -v
33-
php -v > ./coverage/version-php.txt
34-
./vendor/bin/phpunit --version > ./coverage/version-phpunit.txt
35-
./vendor/bin/phpunit --configuration ./phpunit-${{ matrix.php-version }}.xml --coverage-clover ./coverage/coverage.clover --coverage-html ./coverage/html/
35+
mkdir -p ./coverage/php-${{ matrix.php-version }}
36+
./vendor/bin/phpunit --configuration ./phpunit-${{ matrix.php-version }}.xml --coverage-clover ./coverage/php-${{ matrix.php-version }}/coverage.clover --coverage-html ./coverage/php-${{ matrix.php-version }}/html/
37+
38+
- name: Get current date/time
39+
id: date
40+
run: echo "::set-output name=date::$(date +'%Y%m%d-%H%M')"
3641

3742
- name: Save coverage results
3843
uses: actions/upload-artifact@v3
3944
with:
40-
name: coverage-php${{ matrix.php-version }}
41-
path: ./coverage/
45+
name: coverage_php-array-to-xml_${{ steps.date.outputs.date }}
46+
path: ./coverage

0 commit comments

Comments
 (0)