-
Notifications
You must be signed in to change notification settings - Fork 20
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
638df12
commit aff2748
Showing
4 changed files
with
90 additions
and
6 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,38 @@ | ||
name: format | ||
on: [pull_request, workflow_dispatch] | ||
jobs: | ||
lua: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Check formatting | ||
uses: JohnnyMorganz/stylua-action@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
args: --check . | ||
go: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22 | ||
- name: Run gci | ||
run: | | ||
go install github.com/daixiang0/gci@latest | ||
gci write --skip-generated --skip-vendor -s standard -s default . | ||
working-directory: ./tests/go | ||
- name: Run golines | ||
run: | | ||
go install mvdan.cc/gofumpt@latest | ||
go install github.com/segmentio/golines@latest | ||
golines --base-formatter=gofumpt --ignore-generated --tab-len=1 --max-len=120 --write-output . | ||
working-directory: ./tests/go | ||
- name: Check git diff | ||
run: | | ||
git diff --exit-code | ||
working-directory: ./tests/go |
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,14 +1,17 @@ | ||
name: lint | ||
on: [pull_request, workflow_dispatch] | ||
jobs: | ||
lua: | ||
go: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Check formatting | ||
uses: JohnnyMorganz/stylua-action@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
args: --check . | ||
go-version: 1.22 | ||
- name: Run golangci-lint | ||
run: | | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
golangci-lint run ./... | ||
working-directory: ./tests/go |
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,31 @@ | ||
name: vuln | ||
on: [pull_request, workflow_dispatch] | ||
jobs: | ||
lua: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Check formatting | ||
uses: JohnnyMorganz/stylua-action@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
args: --check . | ||
go: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22 | ||
- name: Go vet (vulnerabilities) | ||
run: go vet ./... | ||
working-directory: ./tests/go | ||
- name: Run gosec (security) | ||
run: | | ||
go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
gosec ./... | ||
working-directory: ./tests/go |