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 02bfa45
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 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 }}
6 changes: 3 additions & 3 deletions Makefile
@@ -1,8 +1,8 @@
test: import-cldr
@PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest
@PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest ${PYTEST_FLAGS}

test-cov: import-cldr
@PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest --cov=babel
@PYTHONWARNINGS=default 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
2 changes: 2 additions & 0 deletions tox.ini
Expand Up @@ -12,6 +12,8 @@ deps =
tzdata;sys_platform == 'win32'
whitelist_externals = make
commands = make clean-cldr test-cov
env =
PYTEST_FLAGS=--cov-report=xml:{env:COVERAGE_XML_PATH:.coverage_cache}/coverage.{envname}.xml
passenv =
BABEL_*
PYTHON_*
Expand Down

0 comments on commit 02bfa45

Please sign in to comment.