Skip to content
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

Added black and flake8 as GitHub actions blockers #25

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

officialpm
Copy link

@officialpm officialpm commented Oct 6, 2020

Black and Flake8 - Github Action

Added black and flake8 as GitHub actions blockers 💯

Fixes #23

You need to add secrets to the repo -

- name: If needed, commit black changes to a new pull request
if: failure()
run: |
black .
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Could you add those as blockers. Like check if black formatting is correct?
black -v . was for this I think.

And the same for pyflake8

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so only formatting check should be done?

I have added auto formatting action too
which formats itself and pushes a formatted code

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - put only formatting check - the developer should make sure the code is clean before pushing

Copy link
Author

@officialpm officialpm Oct 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 💯

@gmuraru
As you can see here https://github.com/gmuraru/MiceNDemons/pull/25/checks?check_run_id=1219688894
Already there are some files having errors!

And the action will annotate automatically, just add the GITHUBTOKEN as your repo secret and its done 👍🏻

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - could you put the limit to 80 characters, please. And after this, the commit should respect a specific format. Even if black/flake8 fails I can merge this and I can put up a fix later for it.

uses: actions/checkout@master
- name: Install flake8
run: pip install flake8
- uses: grantmcconnaughey/lintly-flake8-github-action@v1.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Could this be removed?

- name: Install flake8
run: pip install flake8
- uses: grantmcconnaughey/lintly-flake8-github-action@v1.0
with:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Could we remove everything from this with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add black and flake8 as github actions blockers
2 participants