diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f054106b..e3e895952 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,4 +28,8 @@ jobs: python -m pip install tox tox-gh-actions==2.1.0 - name: Run test via Tox run: tox --skip-missing-interpreters - - uses: codecov/codecov-action@v1 + env: + COVERAGE_XML_PATH: ${{ runner.temp }} + - uses: codecov/codecov-action@v2 + with: + directory: ${{ runner.temp }} diff --git a/.gitignore b/.gitignore index 2886dec52..b890ef9b0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ *~ .*cache .DS_Store +.coverage .idea .tox /venv* @@ -18,6 +19,6 @@ dist docs/_build test-env tests/messages/data/project/i18n/en_US +tests/messages/data/project/i18n/fi_BUGGY/LC_MESSAGES/*.mo tests/messages/data/project/i18n/long_messages.pot tests/messages/data/project/i18n/temp* -tests/messages/data/project/i18n/fi_BUGGY/LC_MESSAGES/*.mo diff --git a/Makefile b/Makefile index 59c8555d9..bc536558a 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ test: import-cldr - @PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest + python ${PYTHON_TEST_FLAGS} -m pytest ${PYTEST_FLAGS} test-cov: import-cldr - @PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest --cov=babel + python ${PYTHON_TEST_FLAGS} -m pytest --cov=babel ${PYTEST_FLAGS} test-env: @virtualenv test-env @@ -13,7 +13,7 @@ clean-test-env: @rm -rf test-env standalone-test: import-cldr test-env - @test-env/bin/pytest tests + @test-env/bin/pytest tests ${PYTEST_FLAGS} clean: clean-cldr clean-pyc clean-test-env diff --git a/tox.ini b/tox.ini index 5cd0a6ebf..9044cebc5 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,11 @@ deps = tzdata;sys_platform == 'win32' whitelist_externals = make commands = make clean-cldr test-cov +setenv = + PYTEST_FLAGS=--cov-report=xml:{env:COVERAGE_XML_PATH:.coverage_cache}/coverage.{envname}.xml passenv = BABEL_* + PYTEST_* PYTHON_* [gh-actions]