-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c214c54
commit fa920fd
Showing
19 changed files
with
481 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "feat" | ||
include: "scope" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "feat" | ||
include: "scope" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Lint Commit Messages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v5 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
paths: | ||
- '**.go' | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.61 | ||
args: -c .golang-ci.yml -v --timeout=5m | ||
env: | ||
GO111MODULES: off |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Test and coverage | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.23.x] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: go get | ||
run: go get ./... | ||
|
||
- name: go mod tidy | ||
run: go mod tidy | ||
|
||
- name: Run coverage | ||
run: go test -race -coverprofile="coverage.out" -covermode=atomic ./... | ||
|
||
- name: Upload coverage to Codecov | ||
if: matrix.os == 'ubuntu-latest' | ||
run: bash <(curl -s https://codecov.io/bash) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
image: tetafro/golang-gcc:1.19-alpine | ||
|
||
stages: | ||
- lint | ||
- build | ||
- test | ||
- release | ||
|
||
lint: | ||
stage: lint | ||
before_script: | ||
- wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.41.1 | ||
script: | ||
- ./bin/golangci-lint run -c .golang-ci.yml | ||
allow_failure: true | ||
|
||
build: | ||
stage: build | ||
script: | ||
- go build | ||
|
||
test: | ||
stage: test | ||
script: | ||
- go test -v -race "$(go list ./... | grep -v /vendor/)" -v -coverprofile=coverage.out | ||
- go tool cover -func=coverage.out | ||
|
||
release: | ||
stage: release | ||
image: | ||
name: goreleaser/goreleaser:v0.164.0 | ||
entrypoint: ["/bin/bash", "-c"] | ||
only: | ||
refs: | ||
- tags | ||
variables: | ||
GITLAB_TOKEN: $GITLAB_TOKEN | ||
|
||
script: | ||
- cd "$CI_PROJECT_DIR" | ||
- goreleaser release --rm-dist |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
linters-settings: | ||
lll: | ||
line-length: 180 | ||
linters: | ||
# disable-all: true | ||
# Uncomment to enable all linters | ||
# enable-all: true | ||
# disabling linters that are abandoned or replaced with better versions | ||
disable: | ||
# - golint | ||
# - deadcode | ||
# - exhaustivestruct | ||
# - ifshort | ||
# - interfacer | ||
# - maligned | ||
# - nosnakecase | ||
# - scopelint | ||
# - structcheck | ||
# - varcheck | ||
- testpackage | ||
- forbidigo | ||
- paralleltest | ||
- varnamelen | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- wastedassign | ||
- exhaustruct | ||
- nolintlint | ||
- wrapcheck | ||
# manual | ||
- unused | ||
- revive | ||
# additional non-default linters that we want to use | ||
enable: | ||
# - gochecknoglobals | ||
# - err113 | ||
# - revive | ||
# - taglint | ||
# - unused | ||
# - gosec | ||
# - gocritic | ||
# - funlen | ||
- goconst | ||
- godox | ||
- gofmt | ||
- misspell | ||
- ireturn | ||
- lll | ||
- nonamedreturns | ||
- staticcheck | ||
- ineffassign | ||
- govet | ||
- gosimple | ||
- errcheck |
Oops, something went wrong.