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

Set up linting check suite in GitHub actions #1

Open
SebastiaanZ opened this issue Sep 12, 2020 · 3 comments
Open

Set up linting check suite in GitHub actions #1

SebastiaanZ opened this issue Sep 12, 2020 · 3 comments

Comments

@SebastiaanZ
Copy link
Owner

SebastiaanZ commented Sep 12, 2020

We need to set up a linting check suite in GitHub Actions for this project. The check suite run on commits to master and on pull requests, including those opened from forks. The latter makes it difficult to use GitHub Actions from the marketplace that insert annotations/review comments, as you need to have access to the secrets/GitHub token for that. This is disabled for Pull Requests opened from a fork.

My proposal:

@SebastiaanZ
Copy link
Owner Author

I've set up a simple linting CI using GitHub actions. It's currently not using one of the actions from the marketplace; it's just using plain flake8.

@scragly
Copy link

scragly commented Sep 19, 2020

Does it have inline code annotations?

@SebastiaanZ
Copy link
Owner Author

Not yet, but I'm planning on changing that later.

To be able to use such actions, we'll need to change the trigger event to pull_request_target, which will slightly change the way in which the workflow works. I think it only means that it will use the already committed workflow file, so it's safer to expose the secrets needed for such annotations actions, but it's still a bit vague.

Another thing that the current annotations actions don't have is the option to also just print the flake8 output to stdout to have a regular overview of all the linting errors. I think the best option currently is to run flake8 two times, which probably isn't a big issue in this repository (we don't have much code to lint), but it's a bit weird.

Anyway, I'm leaving this issue open for now until I, or someone else, had a bit of time to dive into this.

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

No branches or pull requests

2 participants