mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 21:38:25 +00:00
* Update test.yml * Update test.yml * Update test-required.yml * Update lint-required.yml * Update lint.yml
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: linter
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
branches:
|
|
- "main"
|
|
paths-ignore:
|
|
- 'runatlantis.io/**'
|
|
- '.github/**'
|
|
- '**.md'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
golangci-lint:
|
|
if: github.event.pull_request.draft == false
|
|
name: runner / golangci-lint
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: golangci-lint
|
|
uses: reviewdog/action-golangci-lint@v2
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
tool_name: golangci-lint
|
|
|
|
# Use revive via golangci-lint binary with "warning" level.
|
|
revive:
|
|
if: github.event.pull_request.draft == false
|
|
name: runner / revive
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
- name: revive
|
|
uses: reviewdog/action-golangci-lint@v2
|
|
with:
|
|
golangci_lint_flags: "--disable-all -E revive"
|
|
tool_name: revive # Change reporter name.
|
|
level: warning # GitHub Status Check won't become failure with this level.
|
|
|
|
# You can add more and more supported linters with different config.
|
|
errcheck:
|
|
if: github.event.pull_request.draft == false
|
|
name: runner / errcheck
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
- name: errcheck
|
|
uses: reviewdog/action-golangci-lint@v2
|
|
with:
|
|
golangci_lint_flags: "--disable-all -E errcheck"
|
|
tool_name: errcheck
|
|
level: info
|