DEV Community

Discussion on: Add test coverage badge for PHP and Pest in your GitHub repository

Collapse
 
lrljoe profile image
Joe • Edited

Significant problems with this approach!

If you have anything other than a matrix which has one value for each variable, then this action will cause significant issues as it will try to push onto a stale repo.

E.g. try running it with the following, and watch the push_badge fail miserably.

strategy:
      matrix:
        operating-system: ['ubuntu-22.04','ubuntu-20.04']
        php-versions: [ '8.0', '8.1', '8.2' ]
Enter fullscreen mode Exit fullscreen mode

To fix the issues, you can either utterly cripple the actions by setting parallel processing to 1 (thus defeating the purpose of a matrix in the first place, and causing you to wait an hour or two each time you run a significant test suite), or of course you can use an industry standard approach that doesn't involve this kind of 1st grade approach to github actions.