diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 82618fdf..b0324352 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -35,6 +35,12 @@ jobs: - run: tox -e tests-api-mock - run: tox -e coverage-report - run: tox -e tests-server + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ${{ github.repository }} + flags: unittests,server,api-mock tests-noqueue: runs-on: ubuntu-20.04 @@ -51,6 +57,12 @@ jobs: - name: Install tox run: pip install tox - run: tox -e tests-noqueue + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ${{ github.repository }} + flags: tests-noqueue all-tests: runs-on: ubuntu-20.04 @@ -67,6 +79,12 @@ jobs: - name: Install tox run: pip install tox - run: tox -e tests + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ${{ github.repository }} + flags: all-tests lint: runs-on: ubuntu-20.04 diff --git a/.gitignore b/.gitignore index a9d650db..4b248b8f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ settings.yml .coverage .pytest_cache/ build/ +.env +coverage.xml diff --git a/tox.ini b/tox.ini index fe883985..936eccbb 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,8 @@ commands = flake8 bert_e/ [testenv:utests] deps = pip==22.3.1 -commands = pytest bert_e/tests/unit/ {posargs} + pytest-cov==5.0.0 +commands = pytest bert_e/tests/unit/ --cov=bert_e --cov-report=xml {posargs} [testenv:tests-api-mock] deps =