Skip to content

Commit

Permalink
ci: setup main ci
Browse files Browse the repository at this point in the history
  • Loading branch information
baimamboukar committed Dec 22, 2023
1 parent f95b42e commit 76797c5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: go-gin-docker-k8s app ci

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
format-and-lint:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: setup golang
uses: actions/setup-go@v2
with:
go-version: latest

- name: Install linters
run: |
go get -u golang.org/x/lint/golint
go get -u honnef.co/go/tools/cmd/staticcheck
- name: Format code
run: gofmt -s -w .

- name: Lint code
run: |
golint ./...
staticcheck ./...
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
run:
go run main.go
go run main.go
build:
set GOOS=macos && go build -o main
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
import "fmt"

func main() {
fmt.Println("---Starting with GIN-DOCKER-K8s--------")
fmt.Println("----GO-GIN-DOCKER-K8s-----")
}

0 comments on commit 76797c5

Please sign in to comment.