Skip to content

Commit

Permalink
Codecov separate job (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
tavisit authored May 4, 2023
1 parent b14796d commit 38fefc1
Showing 1 changed file with 45 additions and 14 deletions.
59 changes: 45 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ jobs:
QUANTFIN_SECRET: ${{ secrets.QUANTFIN_SECRET }}
run: |
coverage run -m pytest qf_lib/tests/unit_tests
- name: Upload to Codecov
uses: codecov/codecov-action@v3
coverage xml -o unit_tests.xml
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
fail_ci_if_error: true
name: qf-lib-codecov
verbose: true

name: unit_tests
path: unit_tests.xml
backtesting_tests:
runs-on: ubuntu-latest
needs: style_check
Expand All @@ -77,13 +76,12 @@ jobs:
QUANTFIN_SECRET: ${{ secrets.QUANTFIN_SECRET }}
run: |
coverage run -a -m pytest qf_lib/tests/integration_tests/backtesting
coverage xml
- name: Upload to Codecov
uses: codecov/codecov-action@v3
coverage xml -o backtesting_tests.xml
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
fail_ci_if_error: true
name: qf-lib-codecov
verbose: true
name: backtesting_tests
path: backtesting_tests.xml

data_providers_tests:
runs-on: ubuntu-latest
Expand All @@ -106,10 +104,43 @@ jobs:
QUANTFIN_SECRET: ${{ secrets.QUANTFIN_SECRET }}
run: |
coverage run -a -m pytest qf_lib/tests/integration_tests/data_providers
coverage xml
coverage xml -o data_providers_tests.xml
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: data_providers_tests
path: data_providers_tests.xml
codecov_upload:
runs-on: ubuntu-latest
needs: [unit_tests, data_providers_tests, backtesting_tests]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download unit_tests artifacts
uses: actions/download-artifact@v3
with:
name: unit_tests
- name: Download artifacts data_providers_tests
uses: actions/download-artifact@v3
with:
name: data_providers_tests
- name: Download backtesting_tests artifacts
uses: actions/download-artifact@v3
with:
name: backtesting_tests
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==5.0.4 pytest
pip install coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
files: ./unit_tests.xml, ./data_providers_tests.xml, ./backtesting_tests.xml
fail_ci_if_error: true
name: qf-lib-codecov
verbose: true
verbose: true

0 comments on commit 38fefc1

Please sign in to comment.