zalando / gin-oauth2

Middleware for Gin Framework users who also want to use OAuth2
MIT License
572 stars 67 forks source link

Create local ci checks and github actions #78

Open chrishalbert opened 5 months ago

chrishalbert commented 5 months ago

While working #76, I had issues running all of the tests locally. Also, my PR didn't abide to go doc standards, which I also didn't catch. I think this repo could benefit from 2 things:

  1. Local CI Checks - This could be done using a Makefile, which would essentially be duplicating the checks locally so that a developer can verify their PR conforms to standards and the tests work. The Makefile could also automate the setup needed to run the tests locally.
  2. Github Actions - I think the free account allows like 2k action minutes p/month before getting charged. I'm not sure what the owner is ok with, but maybe there could be a post check upon a merge to master. This would keep the usage minimal, even though it would be nice to have this run for each PR - easier said though when I'm not floating the bill 😄
szuecs commented 5 months ago

Yes thank you, I should create some gh action to lint and run tests.

chrishalbert commented 5 months ago

Or even just a way that As a contributing developer, I can run tests and linting locally in the same manner that the CI checks run. On that note, how would I get a .chimp-token to get the zalando_test.go passing? Is there like a mocked server that I can point to for testing purposes? It seems like the CI checks run a number of services that require secrets which makes it hard to dev if not apart of the org.

szuecs commented 5 months ago

@chrishalbert yes likely we should just skip the zalando_test.go