forked from google/jsonapi
-
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
mirafzali
committed
Dec 3, 2024
1 parent
48c64f2
commit f32e5f4
Showing
3 changed files
with
85 additions
and
13 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,57 @@ | ||
name: JSONAPI CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.22.x | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.22.x | ||
cache-dependency-path: go.sum | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: go-fmt | ||
run: | | ||
if [ -n "$(gofmt -s -l .)" ]; then | ||
echo "Go code is not formatted, run 'gofmt -s -w .'" | ||
exit 1 | ||
fi | ||
- name: go-vet | ||
run: go vet ./... | ||
|
||
- name: revive | ||
run: | | ||
go install github.com/mgechev/[email protected] | ||
revive -config .revive.toml -formatter friendly ./... | ||
test: | ||
name: Test | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go 1.22.x | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.22.x | ||
cache-dependency-path: go.sum | ||
|
||
- name: Test JSONAPI | ||
run: go test -v -covermode=count -coverprofile=coverage.out ./... |
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,28 @@ | ||
ignoreGeneratedHeader = false | ||
severity = "warning" | ||
confidence = 0.8 | ||
errorCode = 1 | ||
warningCode = 1 | ||
|
||
[rule.blank-imports] | ||
[rule.context-as-argument] | ||
[rule.context-keys-type] | ||
[rule.dot-imports] | ||
[rule.empty-block] | ||
[rule.error-naming] | ||
[rule.error-return] | ||
[rule.error-strings] | ||
[rule.errorf] | ||
[rule.exported] | ||
[rule.increment-decrement] | ||
[rule.indent-error-flow] | ||
[rule.range] | ||
[rule.receiver-naming] | ||
[rule.redefines-builtin-id] | ||
[rule.superfluous-else] | ||
[rule.time-naming] | ||
[rule.unexported-return] | ||
[rule.unreachable-code] | ||
[rule.unused-parameter] | ||
[rule.var-declaration] | ||
[rule.var-naming] |
This file was deleted.
Oops, something went wrong.