Skip to content

Commit 4d449da

Browse files
authored
Fix CI (#88)
1 parent 76b1eb1 commit 4d449da

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/CI.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
symfony-version: '5.4'
5454
steps:
5555
- name: Check out code
56-
uses: actions/checkout@v2
56+
uses: actions/checkout@v3
5757

5858
- name: Enable coverage
5959
if: ${{ matrix.php-version == '8.1' }}
@@ -73,7 +73,7 @@ jobs:
7373

7474
- name: Setup cache
7575
id: cache
76-
uses: actions/cache@v2
76+
uses: actions/cache@v3
7777
with:
7878
path: |
7979
~/.composer
@@ -105,6 +105,11 @@ jobs:
105105
- name: Tests
106106
run: make test-unit && make test-functional
107107

108+
# Upload to codacy first as codecov action always remove coverage files despite move_coverage_to_trash at false
109+
- name: Upload coverages to Codacy
110+
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
111+
run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
112+
108113
# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
109114
- name: Upload unit tests coverage to codecov
110115
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
@@ -114,6 +119,8 @@ jobs:
114119
name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
115120
flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
116121
fail_ci_if_error: true
122+
move_coverage_to_trash: false
123+
verbose: ${{ runner.debug == '1' }}
117124

118125
- name: Upload functional tests coverage to codecov
119126
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
@@ -123,17 +130,15 @@ jobs:
123130
name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}"
124131
flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}"
125132
fail_ci_if_error: true
126-
127-
- name: Upload coverages to Codacy
128-
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
129-
run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
133+
move_coverage_to_trash: false
134+
verbose: ${{ runner.debug == '1' }}
130135

131136
static-checks:
132137
name: Static checks
133138
runs-on: ubuntu-latest
134139
needs: [ tests ]
135140
steps:
136-
- uses: actions/checkout@v2
141+
- uses: actions/checkout@v3
137142

138143
- name: Setup PHP 8.1
139144
uses: shivammathur/setup-php@v2
@@ -147,7 +152,7 @@ jobs:
147152

148153
- name: Setup cache
149154
id: cache
150-
uses: actions/cache@v2
155+
uses: actions/cache@v3
151156
with:
152157
path: |
153158
~/.composer
@@ -171,7 +176,7 @@ jobs:
171176
steps:
172177
- name: Setup cache
173178
id: cache
174-
uses: actions/cache@v2
179+
uses: actions/cache@v3
175180
with:
176181
path: |
177182
${{ env.CODACY_CACHE_PATH }}
@@ -213,7 +218,7 @@ jobs:
213218

214219
steps:
215220
- name: Check out code
216-
uses: actions/checkout@v2
221+
uses: actions/checkout@v3
217222

218223
- name: Setup PHP ${{ matrix.php-version }}
219224
uses: shivammathur/setup-php@v2
@@ -227,7 +232,7 @@ jobs:
227232

228233
- name: Setup cache
229234
id: cache
230-
uses: actions/cache@v2
235+
uses: actions/cache@v3
231236
with:
232237
path: |
233238
~/.composer

0 commit comments

Comments
 (0)