-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
17 changed files
with
235 additions
and
274 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
# EditorConfig is awesome: https://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = tab | ||
indent_size = 4 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
|
||
[Dockerfile] | ||
indent_style = space | ||
[*.py] | ||
indent_size = 4 | ||
|
||
[*.{json,yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 | ||
[Makefile] | ||
indent_style = tab |
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 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo Running commit-msg hook | ||
|
||
if ! command -v cz >/dev/null 2>&1; then | ||
echo "commitizen could not be found - please install it commiting" | ||
exit 1 | ||
fi | ||
|
||
cz check --allow-abort --commit-msg-file "$1" |
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 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo Running pre-commit hook | ||
|
||
# Run pre-commit, this checks if we changed any files and runs the checks. | ||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') | ||
if [ -n "$FILES" ]; then | ||
if ! task lint --yes >/dev/null 2>&1; then | ||
echo "Error running make lint - please fix before committing" | ||
echo "if this is a mistake you can skip the checks with 'git commit --no-verify'" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
exit 0 |
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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: weekly |
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
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 |
---|---|---|
@@ -1,77 +1,88 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
TASK_X_REMOTE_TASKFILES: 1 | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
cache: true | ||
check-latest: true | ||
go-version-file: go.mod | ||
|
||
- name: Run staticcheck | ||
uses: dominikh/staticcheck-action@fe1dd0c3658873b46f8c9bb3291096a617310ca6 # v1.3.1 | ||
with: | ||
install-go: false | ||
|
||
- name: Run govulncheck | ||
uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3 | ||
with: | ||
go-version-file: go.mod | ||
env: | ||
BRANCH: ${{ github.head_ref || github.ref_name }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh repo clone ${{ github.repository }} ${{ github.workspace }} -- --depth=1 --branch "$BRANCH" | ||
|
||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 | ||
- name: Install tools | ||
run: | | ||
echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH" | ||
/home/linuxbrew/.linuxbrew/bin/brew install \ | ||
actionlint \ | ||
check-jsonschema \ | ||
fd \ | ||
go \ | ||
go-task \ | ||
golangci-lint \ | ||
govulncheck \ | ||
jq \ | ||
prettier \ | ||
shellcheck \ | ||
staticcheck \ | ||
shfmt \ | ||
yamlfmt \ | ||
yamllint \ | ||
- name: Run pre-commit | ||
uses: nikaro/actions/pre-commit@cecb5d4e1f07cde50d8c5738e4a1c60c4938fc9f # 1.6.10 | ||
with: | ||
python-version: 3.x | ||
- name: Lint | ||
run: task lint --yes | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
env: | ||
BRANCH: ${{ github.head_ref || github.ref_name }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh repo clone ${{ github.repository }} ${{ github.workspace }} -- --depth=1 --branch "$BRANCH" | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
cache: true | ||
check-latest: true | ||
go-version-file: go.mod | ||
- name: Install tools | ||
run: | | ||
echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH" | ||
/home/linuxbrew/.linuxbrew/bin/brew install \ | ||
go \ | ||
go-task \ | ||
- name: Build | ||
run: go build -v . | ||
run: task go:build --yes | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
env: | ||
BRANCH: ${{ github.head_ref || github.ref_name }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh repo clone ${{ github.repository }} ${{ github.workspace }} -- --depth=1 --branch "$BRANCH" | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
cache: true | ||
check-latest: true | ||
go-version-file: go.mod | ||
- name: Install tools | ||
run: | | ||
echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH" | ||
/home/linuxbrew/.linuxbrew/bin/brew install \ | ||
go \ | ||
go-task \ | ||
- name: Test | ||
run: go test -v ./... | ||
run: task go:test --yes |
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 |
---|---|---|
|
@@ -24,3 +24,4 @@ config.toml | |
|
||
# Artifacts | ||
_changelog.md | ||
.task/ |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
--- | ||
version: 2 | ||
|
||
builds: | ||
|
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,7 @@ | ||
gitignore_excludes: true | ||
formatter: | ||
eof_newline: true | ||
pad_line_comments: 2 | ||
retain_line_breaks_single: true | ||
scan_folded_as_literal: true | ||
trim_trailing_whitespace: true |
Oops, something went wrong.