Add CI workflows, linter config, and fix all lint issues #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test gatewayd-plugin-auth | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Test gatewayd-plugin-auth | |
| runs-on: ubuntu-latest | |
| # Timeout after 5 minutes, to avoid hanging tests | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go 🧑💻 | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: "1.24" | |
| - name: Lint code issues 🚨 | |
| uses: golangci/golangci-lint-action@v6 | |
| - name: Run Go tests 🔬 | |
| run: go test -cover -covermode atomic -coverprofile=profile.cov -v ./... | |
| - name: Report coverage to coveralls 📈 | |
| uses: shogo82148/actions-goveralls@v1 | |
| with: | |
| path-to-profile: profile.cov |