async-rediscache icon indicating copy to clipboard operation
async-rediscache copied to clipboard

Set up linting check suite in GitHub actions

Open SebastiaanZ opened this issue 5 years ago • 3 comments
trafficstars

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:

  • Use a set up similar to python-discord/django-simple-bulma

SebastiaanZ avatar Sep 12 '20 13:09 SebastiaanZ

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.

SebastiaanZ avatar Sep 19 '20 16:09 SebastiaanZ

Does it have inline code annotations?

scragly avatar Sep 19 '20 16:09 scragly

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.

SebastiaanZ avatar Sep 19 '20 16:09 SebastiaanZ