On 12/4/20 8:08 AM, Andreas Gerstmayr wrote:
> The other missing piece is tox-travis, which allows you to have
fine
> grained control of which tox tests are run for a specific version of
> python. So right now we run all of the default tox jobs for all of the
> python versions (e.g. we run black, flake8, etc. on all versions of
> python). If we wanted to do the same in GHA, we would have to define an
> explicit job for each version of python (instead of using the matrix
> feature) - AFAIK (I'm quite new to GA so if anyone has a better way to
> do this, let me know). IMO this is not a blocker to move to GHA.
Disclaimer: I have GitHub actions knowledge, but I'm new to tox ;)
Are you looking for matrix jobs with two lists, where you get the cartesian product of
both lists? [1]
Example:
strategy:
matrix:
pyver: ['2.7', '3.6', '3.7', '3.8',
'3.9']
job: ['black', 'flake8']
The only matrix we want at the GHA level is for python versions, like
what travis did e.g. in .travis.yml:
matrix:
include:
- python: 2.6
dist: trusty
- python: 2.7
- python: 3.6
- python: 3.7
- python: 3.8
- python: 3.8-dev
And I believe that's what the matrix.pyver: ['2.7', '3.6',
'3.7', '3.8',
'3.9'] does
python:
runs-on: ubuntu-latest
strategy:
matrix:
pyver: ['2.7', '3.6', '3.7', '3.8',
'3.9']
steps:
- name: checkout PR
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyver }}
tox does the rest, running pytest, pylint, etc. on different versions of
python
Further down in the doc [1] there are examples how to include custom combinations - for
example if you want to run a specific tox job only with a single Python version. You can
also exclude some combinations.
Yeah, we might want to use that to replace some of
the advanced features
of the tox-travis plugin, since we won't have that.
[1]
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflo...
Cheers,
Andreas
_______________________________________________
systemroles mailing list -- systemroles(a)lists.fedorahosted.org
To unsubscribe send an email to systemroles-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/systemroles@lists.fedorahost...