Skip to content

Commit

Permalink
ci: staticcheck use github hosted
Browse files Browse the repository at this point in the history
why? the ci is lightweight, and we would like to make it simple.
  • Loading branch information
xiaost committed Jul 30, 2024
1 parent 34d5327 commit c4fad10
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [ pull_request ]

jobs:
compliant:
runs-on: [ self-hosted, X64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Expand All @@ -17,20 +17,13 @@ jobs:
uses: crate-ci/typos@master

staticcheck:
runs-on: [ self-hosted, X64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22"

- uses: actions/cache@v3
uses: actions/setup-go@v5
with:
path: ~/go/pkg/mod
key: reviewdog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
reviewdog-${{ runner.os }}-go-
go-version: stable

- uses: reviewdog/action-staticcheck@v1
with:
Expand All @@ -39,22 +32,24 @@ jobs:
reporter: github-pr-review
# Report all results.
filter_mode: nofilter
# Exit with 1 when it find at least one finding.
# Exit with 1 when it finds at least one finding.
fail_on_error: true
# Set staticcheck flags
staticcheck_flags: -checks=inherit,-SA1029
# -ST1006 for fixing jit code receiver names like `self`
staticcheck_flags: -checks=inherit,-SA1029, -ST1006

lint:
runs-on: [ self-hosted, X64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: stable

- name: Golangci Lint
# https://golangci-lint.run/
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true

0 comments on commit c4fad10

Please sign in to comment.