Comments (8)
What about an option --fail-on-no-environment
? That wouldn't be a breaking change.
from tox-gh-actions.
Agreed, it was surprising than tox running no testenv resulted in success.
from tox-gh-actions.
Sorry for a slow response but I just published tox-gh-actions v2.12.0 which adds an option to fail when no environments are matched. Please check details in README and give it a try: https://github.com/ymyzk/tox-gh-actions/blob/v2.12.0/README.md#fail-when-no-environments-are-matched
Thank you all for your patience!
from tox-gh-actions.
Thanks for sharing additional feedback. Adding an option to fail should be possible but let me think about it a bit deeper before actually implementing it as tox-gh-actions hasn't provided any CLI options so far.
from tox-gh-actions.
This is especially important since it is not very well documented that, in order to be eligible for selection by this plugin, the env must also be present in envlist
. This may make sense to those who understand how Tox plugins work, but is not intuitive to mere users. A failure on an empty generated envlist
would help users detect and diagnose this.
from tox-gh-actions.
Hello everyone, thanks for the feedback. At this point, I'd like to avoid actually failing the tox when it couldn't find no environments as it can be technically a breaking change for exiting users.
At the same time, I understand this issue can be a bit difficult to catch for users. I'd like to propose showing a warning message when this problem happens as a mitigation: #123
This is especially important since it is not very well documented that, in order to be eligible for selection by this plugin, the env must also be present in envlist.
As the first example in README only specifies envlist
and gh-actions
, I was assuming it's clear enough for users but if you have ideas to improve the README further, feel free to open a PR.
[tox]
envlist = py37, py38, py39, py310, mypy
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310, mypy
[testenv]
...
from tox-gh-actions.
Just having an example of how to do it right does not inform users about nuanced behaviors when they deviate from the example.ยน Even this would be better:
[tox]
# gh-actions only has access to environments explicitly listed in envlist
envlist = py38, py39, py310, mypy
[gh-actions]
python =
# note that py37 and py38-legacy will silently never be run because they are missing from envlist
3.7: py37
3.8: py38, py38-legacy
3.9: py39
3.10: py310, mypy
[testenv]
...
I like the --fail-on-no-environment
option, but I like the --fail-on-missing-environment
better, which would error if there was an environment listed in the [gh-actions]
section that was unreachable or not also present in envlist
. Either way, there should likely be warnings for any unreachable environments listed in [gh-actions]
.
ยน Assuming otherwise is typical by people already familiar with the behaviors in question, but often flawed. Those people are not the audience of documentation. The mere existence of this issue is evidence that your assumptions deserve revisiting. Further, if you can solve your user's difficulty with poor ergonomics by improving ergonomics, that's almost always a better solution than relying on secondary sources like documentation.
from tox-gh-actions.
If it is easier, then maybe some environment variable could be used?
from tox-gh-actions.
Related Issues (20)
- Cannot find matcher.json after update to 2.9.0 HOT 8
- pypy2 HOT 3
- `tox-gh-actions` selects too many environments HOT 1
- Error in alpine Linux with matchers HOT 3
- Python 3.11 Support HOT 2
- Valid versioning syntax when specifying Python version in tox.ini HOT 4
- Can the warning about "no found environment" be turned into an error? HOT 2
- [regression] tox-gh-actions >= 3 breaks tox >= 4 HOT 3
- No coverage report data on windows-latest workflows HOT 2
- Package Installation failing on github actions. HOT 2
- TypeError comparing options.parallel to None HOT 4
- Python 3.6 environment not found, but works for 3.7, 3,8, 3,9... HOT 2
- Improve error reporting when a config is malformed HOT 1
- TypeError when running `tox --parallel` HOT 2
- Python `version: factor` mapping causes side-effect on Tox v4 HOT 2
- Tox step not executed
- Release 3.1.2 is causing a SyntaxError HOT 3
- `requires` in `[tox]` breaks factoring out environments HOT 1
- Tox is running different python version to the one installed by Github Actions HOT 1
- idea: colorize output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tox-gh-actions.