Skip to content

Commit

Permalink
chore: migrate from Coveralls to CodeClimate for coverage reporting
Browse files Browse the repository at this point in the history
- Replace Coveralls GitHub action with CodeClimate coverage reporter
- Add fetch-depth: 0 to checkout action for proper git history comparison
- Enable debug mode in CodeClimate action for better visibility
- Update README badges to use CodeClimate instead of Coveralls

Note: After merging, CC_TEST_REPORTER_ID secret needs to be added to the
repository settings from CodeClimate.
  • Loading branch information
gabezurita committed Dec 19, 2024
1 parent 239d248 commit 706a81a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Install Poetry"
run: pipx install poetry
Expand All @@ -41,13 +43,11 @@ jobs:
run: |
poetry run pytest --cov=src --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
- name: Upload coverage to Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage.xml
flag-name: Unit Tests
fail-on-error: false
base-path: ${{ github.workspace }}
compare-ref: ${{ github.event.pull_request.base.ref || github.base_ref || 'main' }}
github-write-mode: true
coverageLocations: |
${{github.workspace}}/coverage.xml:coverage.py
debug: true
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Disability Max Ratings API

[![Tests](https://github.com/department-of-veterans-affairs/disability-max-ratings-api/actions/workflows/test-code.yml/badge.svg)](https://github.com/department-of-veterans-affairs/disability-max-ratings-api/actions/workflows/test-code.yml)
[![Coverage Status](https://coveralls.io/repos/github/department-of-veterans-affairs/disability-max-ratings-api/badge.svg?branch=ci-code-coverage)](https://coveralls.io/github/department-of-veterans-affairs/disability-max-ratings-api?branch=ci-code-coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/YOUR_REPO_ID/maintainability)](https://codeclimate.com/github/department-of-veterans-affairs/disability-max-ratings-api/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/YOUR_REPO_ID/test_coverage)](https://codeclimate.com/github/department-of-veterans-affairs/disability-max-ratings-api/test_coverage)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
![Python Version from PEP 621 TOML](https://img.shields.io/badge/Python-3.12-blue)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
Expand Down

0 comments on commit 706a81a

Please sign in to comment.