-
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.
Signed-off-by: Russell <[email protected]>
- Loading branch information
Showing
23 changed files
with
454 additions
and
168 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @rtrox |
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,22 @@ | ||
project_name: "lybbrio" | ||
archives: | ||
- id: main | ||
wrap_in_directory: true | ||
files: | ||
- "README.md" | ||
builds: | ||
- main: ./cmd/lybbrio/main.go | ||
binary: lybbrio | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} -X main.revision={{.Commit}} -X main.buildTime={{.CommitTimestamp}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
changelog: | ||
use: github-native |
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,18 @@ | ||
run: | ||
timeout: 3m | ||
linters: | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- typecheck | ||
- unused | ||
# - wsl | ||
# - dupl | ||
# - errorlint | ||
# - gofmt | ||
# - goconst | ||
# - revive |
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 @@ | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v0.7.1 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.28.0 | ||
hooks: | ||
- args: | ||
- --config-file | ||
- .github/lint/yamllint.yaml | ||
id: yamllint |
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,14 @@ | ||
extends: default | ||
rules: | ||
truthy: | ||
allowed-values: ["true", "false", "on"] | ||
comments: | ||
min-spaces-from-content: 1 | ||
line-length: disable | ||
braces: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 1 | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
indentation: enable |
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,19 @@ | ||
# .github/release.yml | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- rtrox | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- Semver-Major | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- Semver-Minor | ||
- enhancement | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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,58 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
], | ||
"enabled": true, | ||
"timezone": "America/Los_Angeles", | ||
"semanticCommits": "enabled", | ||
"dependencyDashboard": true, | ||
"dependencyDashboardTitle": "Renovate Dashboard 🤖", | ||
"commitBody": "Signed-off-by: Russell Troxel <[email protected]>", | ||
"suppressNotifications": ["prIgnoreNotification"], | ||
"rebaseWhen": "conflicted", | ||
"commitMessageTopic": "{{depName}}", | ||
"commitMessageExtra": "to {{newVersion}}", | ||
"commitMessageSuffix": "", | ||
"git-submodules": { | ||
"enabled": true | ||
}, | ||
"enabledManagers": [ | ||
"dockerfile", | ||
"gomod", | ||
"git-submodules", | ||
"pre-commit", | ||
"github-actions" | ||
], | ||
"assignees": ["rtrox"], | ||
"assignAutomerge": true, | ||
"labels": ["dependencies"], | ||
"packageRules": [ | ||
// add labels according to package and update types | ||
{ | ||
"matchDepTypes": ["optionalDependencies"], | ||
"addLabels": ["optional"] | ||
}, | ||
{ | ||
"matchUpdateTypes": ["major"], | ||
"addLabels": ["dep/major"] | ||
}, | ||
{ | ||
"matchUpdateTypes": ["minor"], | ||
"addLabels": ["dep/minor"], | ||
}, | ||
{ | ||
"matchUpdateTypes": ["patch"], | ||
"addLabels": ["dep/patch"], | ||
}, | ||
{ | ||
"matchDatasources": ["docker"], | ||
"addLabels": ["dep/docker"], | ||
}, | ||
{ | ||
"matchDatasources": ["git-refs"], | ||
"addLabels": ["dep/git-ref"], | ||
}, | ||
// enable auto-merge | ||
{ "updateTypes": ["minor", "patch", "pin", "digest"], "automerge": true } | ||
] | ||
} |
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,10 @@ | ||
name: Handle Push to Main Branch | ||
# https://dev.to/koddr/github-action-for-release-your-go-projects-as-fast-and-easily-as-possible-20a2 | ||
# https://github.com/orgs/community/discussions/25244 | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yaml |
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,53 @@ | ||
name: Create Release | ||
# https://dev.to/koddr/github-action-for-release-your-go-projects-as-fast-and-easily-as-possible-20a2 | ||
# https://github.com/orgs/community/discussions/25244 | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yaml | ||
main-branch-check: | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
outputs: | ||
on_main_branch: ${{ steps.register_tag.outputs.on_main_branch }} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: rickstaa/action-contains-tag@v1 | ||
id: contains_tag | ||
with: | ||
reference: "main" | ||
tag: "${{ github.ref }}" | ||
- name: register output | ||
id: register_tag | ||
run: | | ||
echo "retval: ${{ steps.contains_tag.outputs.retval }}" | ||
echo "::set-output name=on_main_branch::${{ steps.contains_tag.outputs.retval }}" | ||
release-tag: | ||
runs-on: ubuntu-latest | ||
needs: main-branch-check | ||
if: ${{ needs.main-branch-check.outputs.on_main_branch }} == true | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.4 | ||
id: go | ||
- name: Create Release | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release --rm-dist --config .github/goreleaser-dist.yaml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,60 @@ | ||
name: Run Tests | ||
on: | ||
workflow_call: | ||
jobs: | ||
pre-commit-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --config .github/lint/precommit-ci.yaml | ||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ">=1.21.4" | ||
- name: Check Go Fmt | ||
run: | | ||
go version | ||
go fmt ./... | ||
git diff --exit-code | ||
- name: Check Go mod | ||
run: | | ||
go version | ||
go mod tidy | ||
git diff --exit-code | ||
- uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.51.2 | ||
args: --timeout 5m --config .github/lint/golangci.yaml | ||
go-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ">=1.21.4" | ||
- name: Tidy | ||
run: | | ||
go version | ||
go mod tidy | ||
git diff --exit-code | ||
- name: Run Unit tests | ||
run: | | ||
go version | ||
go test -v -race -covermode atomic -coverprofile=covprofile ./... | ||
# - name: Install goveralls | ||
# run: | | ||
# go version | ||
# go install github.com/mattn/goveralls@latest | ||
|
||
# - name: Send coverage | ||
# env: | ||
# COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: goveralls -coverprofile=covprofile -service=github |
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,22 @@ | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v0.7.1 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.28.0 | ||
hooks: | ||
- args: | ||
- --config-file | ||
- .github/lint/yamllint.yaml | ||
id: yamllint | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.51.2 | ||
hooks: | ||
- id: golangci-lint | ||
args: | ||
- --config | ||
- .github/lint/golangci.yaml |
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 |
---|---|---|
|
@@ -1137,4 +1137,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.