This file contains 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: "[lint, test, build]" | |
on: [push, pull_request] | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go environment |
This file contains 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
run: | |
timeout: 3m | |
go: "1.18" | |
linters: | |
disable-all: true | |
enable: | |
- deadcode | |
- depguard | |
- dogsled |
This file contains 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
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.1.0 | |
hooks: | |
- id: trailing-whitespace | |
- id: end-of-file-fixer | |
- id: check-yaml | |
- id: check-merge-conflict | |
- repo: local | |
hooks: |
This file contains 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
FROM --platform=$BUILDPLATFORM golang:1.18-buster as builder | |
WORKDIR /go/src/github.com/{ORGANIZATION_NAME}/{REPOSITORY_NAME} | |
COPY go.* . | |
RUN go mod download | |
COPY . . |