Skip to content

Commit

Permalink
modify codeclimate coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
chinelo-obitube authored and chinelo-obitube committed Jul 19, 2024
1 parent b4350ca commit f160bd8
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,27 @@ jobs:
-e AWS_CONFIG_FILE=/app/credentials \
api test/test-coverage.sh
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: api test/test-coverage.sh
debug: true
- name: Install dependencies
run: |
gem install bundler
bundle install
- name: Generate coverage report
run: |
docker-compose exec -e CC_TEST_REPORTER_ID=${{ secrets.CC_TEST_REPORTER_ID }} \
-e GIT_COMMIT_SHA=${{ github.sha }} \
-e GITHUB_REF_NAME=${{ github.head_ref || github.ref_name }} \
-e AWS_CONFIG_FILE=/app/credentials \
api test/test-coverage.sh \
-c "bundle exec codeclimate-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json"
- name: Upload coverage report to Code Climate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
docker-compose exec -e CC_TEST_REPORTER_ID=${{ secrets.CC_TEST_REPORTER_ID }} \
-e GIT_COMMIT_SHA=${{ github.sha }} \
-e GITHUB_REF_NAME=${{ github.head_ref || github.ref_name }} \
-e AWS_CONFIG_FILE=/app/credentials \
api test/test-coverage.sh \
-c "bundle exec codeclimate-test-reporter upload-coverage"

0 comments on commit f160bd8

Please sign in to comment.