File tree Expand file tree Collapse file tree 2 files changed +59
-13
lines changed Expand file tree Collapse file tree 2 files changed +59
-13
lines changed Original file line number Diff line number Diff line change 42
42
fail-fast : false
43
43
matrix :
44
44
php-version : [ '7.2', '7.3' ]
45
- coverage : [ 'none' ]
46
- include :
47
- - php-version : ' 7.4'
48
- coverage : xdebug
49
45
50
46
steps :
51
47
- name : Checkout
57
53
php-version : ${{ matrix.php-version }}
58
54
ini-values : error_reporting=E_ALL
59
55
tools : composer:v2
60
- coverage : " ${{ matrix.coverage }} "
56
+ coverage : none
61
57
62
58
- name : Show the Composer configuration
63
59
run : composer config --global --list
76
72
composer show;
77
73
78
74
- name : Run Tests
79
- run : ./vendor/bin/phpunit --coverage-clover build/coverage/xml
80
-
81
- - name : Upload coverage results to Codacy
82
- env :
83
- CODACY_PROJECT_TOKEN : ${{ secrets.CODACY_PROJECT_TOKEN }}
84
- if : " ${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}"
85
- run : |
86
- ./vendor/bin/codacycoverage clover build/coverage/xml
75
+ run : ./vendor/bin/phpunit
87
76
88
77
static-analysis :
89
78
name : Static Analysis
Original file line number Diff line number Diff line change
1
+ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+
9
+ name : Code coverage
10
+
11
+ jobs :
12
+ code-coverage :
13
+ name : Code coverage
14
+
15
+ runs-on : ubuntu-22.04
16
+
17
+ strategy :
18
+ matrix :
19
+ php-version : [ '7.4' ]
20
+
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v4
24
+
25
+ - name : Install PHP
26
+ uses : shivammathur/setup-php@v2
27
+ with :
28
+ php-version : ${{ matrix.php-version }}
29
+ ini-values : error_reporting=E_ALL
30
+ tools : composer:v2
31
+ coverage : xdebug
32
+
33
+ - name : Show the Composer configuration
34
+ run : composer config --global --list
35
+
36
+ - name : Cache dependencies installed with composer
37
+ uses : actions/cache@v4
38
+ with :
39
+ path : ~/.cache/composer
40
+ key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
41
+ restore-keys : |
42
+ php${{ matrix.php-version }}-composer-
43
+
44
+ - name : Install Composer dependencies
45
+ run : |
46
+ composer update --with-dependencies --no-progress;
47
+ composer show;
48
+
49
+ - name : Run Tests
50
+ run : ./vendor/bin/phpunit --coverage-clover build/coverage/xml
51
+
52
+ - name : Upload coverage results to Codacy
53
+ env :
54
+ CODACY_PROJECT_TOKEN : ${{ secrets.CODACY_PROJECT_TOKEN }}
55
+ if : " ${{ env.CODACY_PROJECT_TOKEN != '' }}"
56
+ run : |
57
+ ./vendor/bin/codacycoverage clover build/coverage/xml
You can’t perform that action at this time.
0 commit comments