Skip to content

Commit 675d4a3

Browse files
committed
ci: pass codecov token and pin phpcov to v12 in mongodb/mercure jobs
| Q | A | ------------- | --- | Branch? | 4.3 | Tickets | ∅ | License | MIT | Doc PR | ∅ Codecov rejects tokenless uploads on protected branches; pass secrets.CODECOV_TOKEN to every codecov-action step. Also pin the remaining unpinned phpcov downloads to phpcov-12.phar so coverage merge stops failing against php-code-coverage 12.x.
1 parent c0886c1 commit 675d4a3

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ jobs:
291291
if: matrix.coverage
292292
uses: codecov/codecov-action@v5
293293
with:
294+
token: ${{ secrets.CODECOV_TOKEN }}
294295
directory: build/logs/phpunit
295296
name: phpunit-php${{ matrix.php }}
296297
flags: phpunit
@@ -380,6 +381,7 @@ jobs:
380381
if: matrix.coverage
381382
uses: codecov/codecov-action@v5
382383
with:
384+
token: ${{ secrets.CODECOV_TOKEN }}
383385
directory: /tmp/build/logs/phpunit
384386
name: phpunit-php${{ matrix.php }}
385387
flags: phpunit
@@ -521,6 +523,7 @@ jobs:
521523
if: matrix.coverage
522524
uses: codecov/codecov-action@v5
523525
with:
526+
token: ${{ secrets.CODECOV_TOKEN }}
524527
directory: build/logs/behat
525528
name: behat-php${{ matrix.php }}-shard${{ matrix.shard }}
526529
flags: behat
@@ -703,7 +706,7 @@ jobs:
703706
vendor/bin/behat --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=mongodb-coverage --no-interaction
704707
- name: Merge code coverage reports
705708
run: |
706-
wget -qO /usr/local/bin/phpcov https://phar.phpunit.de/phpcov.phar
709+
wget -qO /usr/local/bin/phpcov https://phar.phpunit.de/phpcov-12.phar
707710
chmod +x /usr/local/bin/phpcov
708711
mkdir -p build/coverage
709712
phpcov merge --clover build/logs/behat/clover.xml build/coverage
@@ -718,6 +721,7 @@ jobs:
718721
- name: Upload coverage results to Codecov
719722
uses: codecov/codecov-action@v5
720723
with:
724+
token: ${{ secrets.CODECOV_TOKEN }}
721725
directory: build/logs/behat
722726
name: behat-php${{ matrix.php }}
723727
flags: behat
@@ -793,7 +797,7 @@ jobs:
793797
vendor/bin/behat --out=std --format=progress --format=junit --out=build/logs/behat/junit --profile=mercure-coverage --no-interaction
794798
- name: Merge code coverage reports
795799
run: |
796-
wget -qO /usr/local/bin/phpcov https://phar.phpunit.de/phpcov.phar
800+
wget -qO /usr/local/bin/phpcov https://phar.phpunit.de/phpcov-12.phar
797801
chmod +x /usr/local/bin/phpcov
798802
mkdir -p build/coverage
799803
phpcov merge --clover build/logs/behat/clover.xml build/coverage
@@ -808,6 +812,7 @@ jobs:
808812
- name: Upload coverage results to Codecov
809813
uses: codecov/codecov-action@v5
810814
with:
815+
token: ${{ secrets.CODECOV_TOKEN }}
811816
directory: build/logs/behat
812817
name: behat-php${{ matrix.php }}
813818
flags: behat
@@ -1275,6 +1280,7 @@ jobs:
12751280
if: matrix.coverage
12761281
uses: codecov/codecov-action@v5
12771282
with:
1283+
token: ${{ secrets.CODECOV_TOKEN }}
12781284
directory: build/logs/phpunit
12791285
name: phpunit-php${{ matrix.php }}
12801286
flags: phpunit

0 commit comments

Comments
 (0)