Closed badams closed 3 years ago
Thanks for this report. Are you using PHP 8 for uploading or another PHP version? Also, do you use the phar file or do you use ocular as a dependency in your project?
Hi @schmittjoh,
afaik we're using PHP 7.4 (whatever defaults with ubuntu 20), but I can confirm.
Heres a copy of the github action we're running that has this issue
name: 'Frontend CI'
on:
push:
branches:
- master
- develop
- test
- stage
pull_request:
jobs:
test:
env:
SCRUTINIZER_ACCESS_TOKEN: ${{secrets.SCRUTINIZER_ACCESS_TOKEN}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: npm install
- name: Eslint
run: npm run eslint
- name: Prettier
run: npm run prettier
- name: Jest
run: npm run jest -- --coverage
- name: Upload Coverage report
run: |
curl -L https://scrutinizer-ci.com/ocular.phar > ./ocular.phar
php ocular.phar code-coverage:upload --access-token="${SCRUTINIZER_ACCESS_TOKEN}" --format=clover coverage/clover.xml
@schmittjoh I've finally got a chance to do some debugging, and yes - this appears to be related to php 8.
I've been able to work around this for now by forcing php7.4
Thanks for the update. The ocular.phar file is not updated to the latest release of the package as it would break some older PHP versions. Have you already tried adding it as a dev dependency to your project, and uploading via vendor/bin/ocular
?
Thanks for the update. The ocular.phar file is not updated to the latest release of the package as it would break some older PHP versions. Have you already tried adding it as a dev dependency to your project, and uploading via
vendor/bin/ocular
?
@schmittjoh Yes have tried, but results in conflicts with guzzle etc, We also looked at installing it globally on the CI but that was resulting in permission issues
Thanks for the update. The ocular.phar file is not updated to the latest release of the package as it would break some older PHP versions. Have you already tried adding it as a dev dependency to your project, and uploading via
vendor/bin/ocular
?
worked great for me. thanks!
ah. might have spoken too fast. no issue while running the test suite anymore, but scrutinizer doesn't seem to receive/pick up the uploaded files. will investigate.
I had the same issue like @badams and setting it up as composer package dependency scrutinizer/ocular
as mentioned by @schmittjoh fixed the issue with PHP8 for me.
Thanks for the help with this @schmittjoh I've resolved our dependency conflicts so can install it via composer
I've got multiple code coverage reports being uploaded per PR for a project (PHP and JS), this has worked well up until the last few days, where the second report is being rejected now..
In my case the php test suite is finishing first and uploading the coverage report, and then the js test suite will finish a bit later, and results in this error