Skip to content

Commit

Permalink
Corrected Code Coverage Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thivinanandh committed May 3, 2024
1 parent 8cb50f1 commit 50908ee
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,19 @@ on:
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
build:
runs-on: ubuntu-latest
name: Test python API
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run ATS
uses: codecov/codecov-ats@v0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run tests and collect coverage
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
flags: smart-tests
verbose: true
python-version: '3.10'
- name: Install requirements
run: pip install -r api/requirements.txt
- name: Run tests and collect coverage
run: pytest --cov=api.calculator --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 50908ee

Please sign in to comment.