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

Feature/template #9

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 🎫 Ticket Reference
<!-- Please provide a link to your ticket if exists -->

### 📝 Changes
<!-- Please provide a brief description of the changes -->
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/go.sum"
- name: Setup Swagger
run: |
go install github.com/swaggo/swag/cmd/[email protected]
swag init -g cmd/main.go
- uses: golangci/golangci-lint-action@v6
with:
version: v1.60

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/go.sum"
- name: Setup Swagger
run: |
go install github.com/swaggo/swag/cmd/[email protected]
swag init -g cmd/main.go
- name: Run tests
run: go test -race ./...

detect-secrets:
name: Detect Secrets
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: detect-secrets
uses: reviewdog/[email protected]
with:
reporter: github-pr-review
fail-on-error: true
detect_secrets_flags: --exclude-files '.*_test\.go$'

govulncheck:
name: Run govulncheck
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: "**/go.sum"
- name: Setup Swagger
run: |
go install github.com/swaggo/swag/cmd/[email protected]
swag init -g cmd/main.go
- name: Run govulncheck
run: |
go install golang.org/x/vuln/cmd/[email protected]
govulncheck -C . -format text ./...
Loading