Closed asottile closed 3 years ago
In GitLab by @cclauss on Feb 13, 2019, 08:05
changed title from Should this project contain/support a GitHub Action to Should this project contain/support a GitHub Action{+ for Flake8?+}
In GitLab by @cclauss on Feb 13, 2019, 09:02
changed the description
In GitLab by @sigmavirus24 on Feb 14, 2019, 03:29
I don't have a strong opinion. I think it will be more reasonable to discuss this once GitHub has made Actions GA. They tend to make wild, backwards incompatible changes, while things are in Beta, and I don'to feel like keeping up with any of that.
In GitLab by @asottile on Feb 14, 2019, 07:31
I've put a bit of thought into this and it's going to be really difficult to get right. We ~had a similar setup to this at my current workplace (globally managed "linting container") and while it solved a duplication problem, it created an update-hell problem.
Notably, whenever we wanted to use a newer version of flake8
we'd either be stuck or we'd break 300+ repositories. It just wasn't feasible to have a centrally managed global container. What we ended up doing was configuring pre-commit for each repository (such that they could pick their local configurations of linters) and then providing a global pre-commit container to run those configurations. Consuming repos could then update at whatever cadence they wanted.
To be honest, I haven't looked that much into github actions myself so it's possible that I'm missing something but my cursory look didn't turn up any way to version things :(
In GitLab by @sobolevn on Nov 11, 2019, 06:07
You can use wemake-python-styleguide
as an example for building custom Github Actions.
Links:
In GitLab by @asottile on Jan 16, 2020, 14:47
I'm not sure what this action would do other than exec flake8 .
-- I don't think that's particularly useful so I'm going to close this as wontfix
In GitLab by @asottile on Jan 16, 2020, 14:47
closed
In GitLab by @sobolevn on Jan 17, 2020, 01:27
Just for the record: one can use reviewdog
together with flake8
to get this result:
It is already bundled with wemake-python-styleguide
, here's the source code for the action: https://github.com/wemake-services/wemake-python-styleguide/blob/master/scripts/entrypoint.sh
Docs: https://wemake-python-stylegui.de/en/latest/pages/usage/integrations/github-actions.html
In GitLab by @cclauss on Feb 13, 2019, 08:04
Should this project contain the code for a simple yet flexible GitHub Action that allows repo maintainers to quickly add automated Flake8 testing on all pull requests submitted to their repos? Putting that code into this repo or another PyCQA repo will focus development efforts on a single, community supported GitHub Action for Flake8 instead of a multitude of homegrown solutions.
Currently you must be in the GitHub Action beta to be able to use Actions.
https://github.com/cclauss/GitHub-Action-for-Flake8