File tree 3 files changed +50
-6
lines changed
3 files changed +50
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : run-tests
2
2
3
3
on :
4
+ pull_request : null
4
5
push :
5
- pull_request :
6
- schedule :
7
- - cron : ' 0 0 * * *'
6
+ branches :
7
+ - main
8
8
9
9
jobs :
10
10
test :
11
11
runs-on : ${{ matrix.os }}
12
12
strategy :
13
13
matrix :
14
14
os : [ ubuntu-latest ]
15
- php : [ 7.4, 7.3, 7.2 ]
15
+ php : [ 8.0, 7.4, 7.3, 7.2 ]
16
16
dependency-version : [ prefer-lowest, prefer-stable ]
17
17
18
18
name : P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
38
38
run : composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
39
39
40
40
- name : Execute tests
41
- run : vendor/bin/phpunit --teamcity
41
+ run : composer ci
42
+
43
+ - uses : actions/upload-artifact@v2
44
+ with :
45
+ name : build-${{ matrix.php }}
46
+ path : build
47
+
48
+ upload-coverage :
49
+ needs :
50
+ - test
51
+ runs-on : ubuntu-latest
52
+ strategy :
53
+ matrix :
54
+ php : [ 8.0, 7.4, 7.3, 7.2 ]
55
+ steps :
56
+ - name : Checkout code
57
+ uses : actions/checkout@v2
58
+ - name : Use PHP
59
+ uses : shivammathur/setup-php@v2
60
+ with :
61
+ php-version : ${{ matrix.php }}
62
+ coverage : pcov
63
+ - uses : actions/download-artifact@v2
64
+ with :
65
+ name : build-${{ matrix.php }}
66
+ path : build
67
+ - name : Publish coverage
68
+ uses : codecov/codecov-action@v1
69
+ with :
70
+ file : ./build/clover.xml
71
+
72
+ delete-artifacts :
73
+ needs :
74
+ - test
75
+ - upload-coverage
76
+ runs-on : ubuntu-latest
77
+ strategy :
78
+ matrix :
79
+ php : [ 8.0, 7.4, 7.3, 7.2 ]
80
+ steps :
81
+ - uses : geekyeggo/delete-artifact@v1
82
+ with :
83
+ name : build-${{ matrix.php }}
Original file line number Diff line number Diff line change 1
1
# PHP Enum
2
2
3
3
![ Tests] ( https://github.com/ekvedaras/php-enum/workflows/run-tests/badge.svg )
4
+ [ ![ Code Coverage] ( https://img.shields.io/codecov/c/gh/ekvedaras/php-enum/main?style=flat )] ( https://app.codecov.io/gh/ekvedaras/php-enum )
4
5
[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat )] ( LICENSE )
5
6
[ ![ Latest Version on Packagist] ( https://img.shields.io/packagist/v/ekvedaras/php-enum.svg?style=flat )] ( https://packagist.org/packages/ekvedaras/php-enum )
6
7
[ ![ Total Downloads] ( https://img.shields.io/packagist/dt/ekvedaras/php-enum.svg?style=flat )] ( https://packagist.org/packages/ekvedaras/php-enum )
Original file line number Diff line number Diff line change 45
45
},
46
46
"scripts" : {
47
47
"test" : " phpunit" ,
48
- "cover" : " phpunit --coverage-html=build"
48
+ "cover" : " phpunit --coverage-html=build" ,
49
+ "ci" : " phpunit --coverage-clover=build/clover.xml --coverage-xml=build/coverage-xml --log-junit=build/junit.xml"
49
50
},
50
51
"config" : {
51
52
"sort-packages" : true
You can’t perform that action at this time.
0 commit comments