Skip to content

Commit

Permalink
ci: export TOXENV variable to select current GH python
Browse files Browse the repository at this point in the history
The generic invocation 'tox -e py' does not work any more, because we now install dependencies using python-version-specific requirements.txt files and we need to know the exact python major.minor version.
Thus we set TOXENV environment variable such that invoking 'tox'
without additional -e options will run only the specified python
version.
  • Loading branch information
anthrotype committed Nov 27, 2020
1 parent 99052cc commit 6bf3409
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Set TOXENV for current python
run: |
TOXENV=$(python -c "import sys; print(f'py{sys.version_info.major}{sys.version_info.minor}')")
echo "TOXENV=$TOXENV" >> "$GITHUB_ENV"
- name: Run the tests
run: tox -e py
run: tox
deploy:
# only run if the commit is tagged...
if: startsWith(github.ref, 'refs/tags/v')
Expand Down

0 comments on commit 6bf3409

Please sign in to comment.