-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add tox #1262
ci: add tox #1262
Conversation
Note, all those tests will currently fail on a |
You have successfully added a new shellcheck configuration |
fba05bf
to
ba38d86
Compare
Maybe, it's good to tackle the |
Oh, you already took care of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love this. But let's put it to use in the same PR, in github workflows?
3b62a30
to
dd908ee
Compare
c5908e4
to
8fa1a57
Compare
It looks like you are using a new tox feature with |
a5f540c
to
143d9e1
Compare
95f8eb0
to
de7a855
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good, but I have one nitpick... You should amend the commit message, since there are no Python-3.6 fixes any more (AFAICT). Otherwise, great job 🥳
`tox` is a standard testing tool for Python projects, this allows you to test locally with all your installed Python version with the following command: `tox -m test -p all` To run the tests in parallel for all supported Python versions. To run linters or type analysis: ``` tox -m lint -p all tox -m type -p all ``` This commit *also* disables the `import-error` warning from `pylint`, not all Python versions have the system-installed Python libraries available and they can't be fetched from PyPI. Some linters have been added and the general order linters run in has been changed. This allows for quicker test failure when running `tox -m lint`. As a consequence the `test_pylint` test has been removed as it's role can now be fulfilled by `tox`. Other assorted linter fixes due to newer versions: - use a str.join method (`consider-using-join`) - fix various (newer) mypy and pylint issues - comments starting with `#` and no space due to `autopep8` This also changes our CI to use the new `tox` setup and on top of that pins the versions of linters used. This might move into separate requirements.txt files later on to allow for easier updating of those dependencies.
@thozza I've removed the reference to py3.6 and py3.7 fixes from the commit message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👨🍳 💋
@@ -19,17 +19,21 @@ jobs: | |||
- "test.run.test_noop" | |||
- "test.run.test_sources" | |||
- "test.run.test_stages" | |||
- "test.src" | |||
environment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wonder: do we need to test against all of these? We currently support these operating systems:
- EL 8 (3.6)
- EL 9 (3.9)
- Fedora 37 (3.11)
- Fedora 38 (3.11)
- Fedora 39 (3.12)
Therefore, I wonder whether we should limit the matrix to just 3.6, 3.9, 3.11, 3.12.
Advantages:
- lower chance of a random failure
- less CO2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The versions were selected based on our README (python >= 3.6
).
We can disable a few of them but then I'd also like to remove that statement. Isn't it possible to switch interpreters to any of the other versions on EL. I'm reasonably sure I've seen either 3.7 or 3.8 mentioned in bug reports before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a side question, do we support operating systems or Python versions with osbuild? Both make sense but I know were also packages for arch and people experiment on Debian and Ubuntu as well.
This limits the list to the Python versions found in current Fedoras, RHELs, and CentOS Streams.
tox
is a standard testing tool for Python projects, this allows you to test locally with all your installed Python version with the following command:tox -e py36,py37,py38,py39,py310,py311 -p all
To run the tests in parallel.