File tree Expand file tree Collapse file tree 3 files changed +50
-43
lines changed Expand file tree Collapse file tree 3 files changed +50
-43
lines changed Original file line number Diff line number Diff line change 1
- service_name : travis-ci
1
+ service_name : github-actions
2
2
coverage_clover : build/logs/clover.xml
3
3
json_path : build/logs/coveralls-upload.json
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ tests :
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ php : ['7.2', '7.3', '7.4', '8.0']
11
+
12
+ name : PHP ${{ matrix.php }} tests
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v2
16
+
17
+ - name : Setup PHP
18
+ uses : shivammathur/setup-php@v2
19
+ with :
20
+ php-version : ${{ matrix.php }}
21
+ extensions : mbstring, json
22
+ coverage : xdebug
23
+
24
+ - name : Install dependencies
25
+ run : composer install
26
+
27
+ - name : Prepare codeclimate test reporter
28
+ if : ${{ matrix.php == '8.0' }}
29
+ run : |
30
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
31
+ chmod +x ./cc-test-reporter
32
+ ./cc-test-reporter before-build
33
+
34
+ - name : Execute tests
35
+ run : XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --testdox
36
+
37
+ - name : Upload the reports to coveralls.io
38
+ if : ${{ matrix.php == '8.0' }}
39
+ run : |
40
+ composer global require php-coveralls/php-coveralls
41
+ php-coveralls -v
42
+ env :
43
+ COVERALLS_REPO_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
+
45
+ - name : Upload the reports to codeclimate
46
+ if : ${{ matrix.php == '8.0' }}
47
+ run : sudo ./cc-test-reporter after-build -r $CC_TEST_REPORTER_ID
48
+ env :
49
+ CC_TEST_REPORTER_ID : 5e32818628fac9eb11d34e2b35289f88169610cc4a98c6f170c74923342284f1
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments