Skip to content

Commit

Permalink
Run tests for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
darylldoyle committed Feb 14, 2022
1 parent 445c5bc commit 0ab366f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test:coverage

- name: Code Coverage
env:
CODECLIMATE_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }}
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }}
GIT_BRANCH: ${{ GITHUB_REF_NAME }}
GIT_COMMIT_SHA: ${{ GITHUB_SHA }}
# Linux: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
# macOS: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64
# @todo Regenerate reporter ID and move it to GitHub secrets (internal environment vars)
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter after-build -r "$CODECLIMATE_REPORTER_ID"
./cc-test-reporter after-build -t clover build/logs/clover.xml
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
}
],
"scripts": {
"test": "phpunit --no-coverage"
"test": "phpunit --no-coverage",
"test:coverage": "phpunit"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 0ab366f

Please # to comment.