Pylint passes locally but fails in Github actions
See original GitHub issueWhat happened:
Check out https://github.com/gleitz/howdoi/pull/433/checks?check_run_id=3861232824
The pylint tests fail in Github actions but pass locally (with the same version of pylint).
Locally:
» python setup.py lint
running lint
Running Flake8...
No lint errors found by Flake8
Running Pylint...
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
No lint errors found by Pylint
» pylint --version
pylint 2.11.1
astroid 2.8.0
Python 3.9.7 (default, Sep 20 2021, 08:30:41)
[Clang 12.0.0 (clang-1200.0.32.29)]
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Pylint fail under does not fail my Github action job
I think you should try running pylint locally without github actions, to see if the command work out of the github actions.
Read more >Test passes, but doesn't on GitHub via GitHub actions
Hi! So lately I've noticed that my GitHub action test suite has begun to fail, which I initially tracked down to failing test...
Read more >[ESLint] Passes locally but fails in CI : r/typescript - Reddit
Edit: Solved - I was accidentally using a linked local version of "type-fest" (as I was working on PR for it and testing...
Read more >GitHub Actions Continuous Integration - SpECTRE
Troubleshooting · Occasionally, a build job will fail because of a problem with GitHub Actions (e.g. it times out). On the Checks tab...
Read more >GitHub Actions Test Automation CI Pipeline & Reporting
Or to run our tests locally during development to see if they pass. ... This way you can try both full passes and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we should do three things:
requirements/dev.txt
)pylint howdoi *.py --rcfile=.pylintrc
(insetup.py
and.pre-commit-config.yaml
and.github/workflows/python-non-master.yml
and.github/workflows/python.yml
).github/workflows/python-non-master.yml
and.github/workflows/python.yml
)@V2dha
Two options here - we can uninstall
pylint
globally or use the virtual environment’s python to run pylint.Let’s try the latter first.
For me, I can find my local python with
which python
Then I can run pylint using this local version of python
This should avoid the import-errors.