Skip to content

Commit

Permalink
feat: make coverage a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoandre-avaiga committed Mar 7, 2024
1 parent 56760e7 commit b333522
Showing 1 changed file with 33 additions and 6 deletions.
39 changes: 33 additions & 6 deletions .github/workflows/overall-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ jobs:
pipfile-version: ${{ matrix.pipfile-version }}

- name: Pytest
run: pipenv run pytest -m "not orchestrator_dispatcher and not standalone and not teste2e" --cov=taipy --cov-append --cov-report="xml:overall-coverage.xml" --cov-report term-missing tests

- name: Coverage
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && ["${{ matrix.python-version }}" == "3.11"] && ["${{ matrix.pipfile-version }}" == "min"]; then
pipenv run pytest -m "not orchestrator_dispatcher and not standalone and not teste2e" --cov=taipy --cov-append --cov-report="xml:overall-coverage.xml" --cov-report term-missing tests
else:
pipenv run pytest -m "not orchestrator_dispatcher and not standalone and not teste2e" tests
fi
shell: bash
- name: Upload coverage artifact
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' && matrix.pipfile-version == 'min'
uses: MishaKav/pytest-coverage-comment@main
uses: actions/upload-artifact@v2
with:
pytest-xml-coverage-path: ./overall-coverage.xml
title: Taipy Overall Coverage Report
name: overall-coverage
path: overall-coverage.xml

intermittent-tests:
needs: [partial-tests]
Expand Down Expand Up @@ -73,3 +78,25 @@ jobs:

- name: Pytest Core orchestrator_dispatcher
run: pipenv run pytest -m "${{ matrix.orchestrator }}" tests/core

coverage:
needs: [overall-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Download coverage artifact
uses: actions/download-artifact@v2
with:
name: overall-coverage
path: overall-coverage.xml

- name: Get coverage
uses: orgoro/[email protected]
with:
coverageFile: overall-coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b333522

Please sign in to comment.