Skip to content

Commit

Permalink
CI: try to fix Codecov with multiple tox environments
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Jan 27, 2022
1 parent 4dc16b5 commit 8dcee83
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -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 }}
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -8,6 +8,7 @@
*~
.*cache
.DS_Store
.coverage
.idea
.tox
/venv*
Expand All @@ -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
6 changes: 3 additions & 3 deletions 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
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Expand Up @@ -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]
Expand Down

0 comments on commit 8dcee83

Please sign in to comment.