generated from cloudwego/.github
-
Notifications
You must be signed in to change notification settings - Fork 2
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
93de1d9
commit 71b1711
Showing
2 changed files
with
25 additions
and
43 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 |
---|---|---|
|
@@ -9,52 +9,35 @@ jobs: | |
- uses: actions/checkout@v3 | ||
|
||
- name: Check License Header | ||
uses: apache/skywalking-eyes/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: apache/skywalking-eyes/header@501a28d2fb4a9b962661987e50cf0219631b32ff | ||
|
||
- name: Check Spell | ||
- name: typos-action | ||
uses: crate-ci/typos@master | ||
|
||
staticcheck: | ||
runs-on: [ self-hosted, X64 ] | ||
resolve-modules: | ||
name: resolve module | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.20" | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: reviewdog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
reviewdog-${{ runner.os }}-go- | ||
- uses: reviewdog/action-staticcheck@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. | ||
reporter: github-pr-review | ||
# Report all results. | ||
filter_mode: nofilter | ||
# Exit with 1 when it find at least one finding. | ||
fail_on_error: true | ||
# Set staticcheck flags | ||
staticcheck_flags: -checks=inherit,-SA1029 | ||
- id: set-matrix | ||
run: ./hack/resolve-modules.sh | ||
|
||
lint: | ||
runs-on: [ self-hosted, X64 ] | ||
name: lint module | ||
runs-on: ubuntu-latest | ||
needs: resolve-modules | ||
strategy: | ||
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Golangci Lint | ||
# https://golangci-lint.run/ | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
working-directory: ${{ matrix.workdir }} | ||
args: -E gofumpt --timeout 10m | ||
skip-pkg-cache: 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