github.com/cloudwego/kitex@v0.9.0/.github/workflows/pr-check.yml (about)

     1  name: Pull Request Check
     2  
     3  on: [ pull_request ]
     4  
     5  jobs:
     6    compliant:
     7      runs-on: [ self-hosted, X64 ]
     8      steps:
     9        - uses: actions/checkout@v3
    10  
    11        - name: Check License Header
    12          uses: apache/skywalking-eyes/header@v0.4.0
    13          env:
    14            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    15  
    16        - name: Check Spell
    17          uses: crate-ci/typos@v1.13.14
    18  
    19    staticcheck:
    20      runs-on: [ self-hosted, X64 ]
    21      steps:
    22        - uses: actions/checkout@v3
    23        - name: Set up Go
    24          uses: actions/setup-go@v3
    25          with:
    26            go-version: 1.19
    27  
    28        - uses: actions/cache@v3
    29          with:
    30            path: ~/go/pkg/mod
    31            key: reviewdog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    32            restore-keys: |
    33              reviewdog-${{ runner.os }}-go-
    34  
    35        - uses: reviewdog/action-staticcheck@v1
    36          with:
    37            github_token: ${{ secrets.github_token }}
    38            # Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
    39            reporter: github-pr-review
    40            # Report all results.
    41            filter_mode: nofilter
    42            # Exit with 1 when it find at least one finding.
    43            fail_on_error: true
    44            # Set staticcheck flags
    45            staticcheck_flags: -checks=inherit,-SA1029
    46  
    47    lint:
    48      runs-on: [ self-hosted, X64 ]
    49      steps:
    50        - uses: actions/checkout@v3
    51        - name: Set up Go
    52          uses: actions/setup-go@v3
    53          with:
    54            go-version: 1.19
    55  
    56        - name: Golangci Lint
    57          # https://golangci-lint.run/
    58          uses: golangci/golangci-lint-action@v3
    59          with:
    60            version: latest