-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from BrosSquad/feat/rework
Refactor whole app
- Loading branch information
Showing
59 changed files
with
1,194 additions
and
1,680 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,25 @@ | ||
name: "Build Base" | ||
|
||
on: | ||
workflow_call: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: ["1.21"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build | ||
run: | | ||
task build |
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,20 @@ | ||
name: "Build" | ||
|
||
on: | ||
push: | ||
paths: | ||
- "cmd/**" | ||
- "pkg/**" | ||
- "main.go" | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- "cmd/**" | ||
- "pkg/**" | ||
- "main.go" | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
uses: "./.github/workflows/build-base.yml" |
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,45 +1,39 @@ | ||
name: 'Tests' | ||
name: "Testing" | ||
|
||
on: | ||
push: | ||
paths: | ||
- "pkg/**" | ||
- "main.go" | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
paths: | ||
- "pkg/**" | ||
- "main.go" | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
unit-tests: | ||
strategy: | ||
matrix: | ||
go: [ 1.20 ] | ||
go: ["1.21"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- uses: actions/cache@v3 | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Set up gotestfmt | ||
run: go install gotesttools/gotestfmt@latest | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run tests | ||
run: | | ||
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | ||
cp config.example.yml config.yml | ||
go test -covermode=atomic -coverprofile=coverage.txt -timeout 5m -json -v ./... | gotestfmt -showteststatus | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.txt | ||
flags: tests | ||
name: codecov-umbrella | ||
fail_ci_if_error: true | ||
verbose: true | ||
task test |
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,97 @@ | ||
run: | ||
concurrency: 16 | ||
timeout: 5m | ||
issues-exit-code: 1 | ||
tests: true | ||
|
||
skip-dirs: | ||
- docs/ | ||
|
||
skip-files: | ||
- "*_gen\\.go$" | ||
|
||
modules-download-mode: mod | ||
allow-parallel-runners: true | ||
go: '1.21' | ||
|
||
output: | ||
format: colored-line-number | ||
print-issued-lines: true | ||
print-linter-name: true | ||
uniq-by-line: true | ||
sort-results: true | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- asasalint | ||
- bidichk | ||
- bodyclose | ||
- decorder | ||
- dupl | ||
- durationcheck | ||
- errcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
- exportloopref | ||
- forbidigo | ||
- gofumpt | ||
- ginkgolinter | ||
- gocheckcompilerdirectives | ||
- gochecknoglobals | ||
- gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- godox | ||
- goerr113 | ||
- goheader | ||
- goimports | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- gosmopolitan | ||
- govet | ||
- grouper | ||
- importas | ||
- ineffassign | ||
- interfacebloat | ||
- loggercheck | ||
- maintidx | ||
- makezero | ||
- mirror | ||
- misspell | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- noctx | ||
- nolintlint | ||
- nonamedreturns | ||
- nosprintfhostport | ||
- paralleltest | ||
- prealloc | ||
- predeclared | ||
- promlinter | ||
- reassign | ||
- revive | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- staticcheck | ||
- stylecheck | ||
- tenv | ||
- testableexamples | ||
- testpackage | ||
- thelper | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- unused | ||
- usestdlibvars | ||
- wastedassign | ||
- whitespace | ||
- zerologlint | ||
- prealloc | ||
- perfsprint |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"task.vscode-task", | ||
"rogalmic.bash-debug", | ||
"mads-hartmann.bash-ide-vscode", | ||
"ms-vscode-remote.remote-containers", | ||
"ms-azuretools.vscode-docker", | ||
"p1c2u.docker-compose", | ||
"usernamehw.errorlens", | ||
"github.vscode-github-actions", | ||
"eamodio.gitlens", | ||
"golang.go", | ||
"mongodb.mongodb-vscode", | ||
"christian-kohler.path-intellisense", | ||
"uniquevision.vscode-plpgsql-lsp", | ||
"foxundermoon.shell-format", | ||
"timonwong.shellcheck", | ||
"mtxr.sqltools", | ||
"JordanHury.sqltools-cassandra", | ||
"mtxr.sqltools-driver-pg", | ||
"wayou.vscode-todo-highlight", | ||
"tooltitudeteam.tooltitude", | ||
"pflannery.vscode-versionlens", | ||
"zxh404.vscode-proto3", | ||
"redhat.vscode-yaml", | ||
"ms-vscode.test-adapter-converter", | ||
"GitHub.vscode-pull-request-github", | ||
"ms-vscode.remote-repositories", | ||
"ms-vsliveshare.vsliveshare", | ||
"aaron-bond.better-comments" | ||
] | ||
} |
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
Oops, something went wrong.