ci: optimize linter script (#18480)
This commit is contained in:
+18
-26
@@ -22,6 +22,20 @@ jobs:
|
||||
check-latest: true
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
Makefile
|
||||
**/Makefile
|
||||
.golangci.yml
|
||||
- name: run linting (long)
|
||||
if: env.GIT_DIFF
|
||||
id: lint_long
|
||||
run: |
|
||||
nix develop -c make lint
|
||||
env:
|
||||
NIX: 1
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
if: steps.lint_long.outcome == 'skipped'
|
||||
with:
|
||||
PATTERNS: |
|
||||
**/*.go
|
||||
@@ -29,33 +43,11 @@ jobs:
|
||||
go.sum
|
||||
**/go.mod
|
||||
**/go.sum
|
||||
# with:
|
||||
# PATTERNS: |
|
||||
# Makefile
|
||||
# **/Makefile
|
||||
# .golangci.yml
|
||||
- name: run linting (long)
|
||||
# if: env.GIT_DIFF
|
||||
# id: lint_long
|
||||
- name: run linting (short)
|
||||
if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF
|
||||
run: |
|
||||
nix develop -c make lint
|
||||
env:
|
||||
GIT_DIFF: ${{ env.GIT_DIFF }}
|
||||
LINT_DIFF: 1
|
||||
NIX: 1
|
||||
# - uses: technote-space/get-diff-action@v6.1.2
|
||||
# if: steps.lint_long.outcome == 'skipped'
|
||||
# id: git_diff_all
|
||||
# with:
|
||||
# PATTERNS: |
|
||||
# **/*.go
|
||||
# go.mod
|
||||
# go.sum
|
||||
# **/go.mod
|
||||
# **/go.sum
|
||||
# - name: run linting (short)
|
||||
# if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF
|
||||
# run: |
|
||||
# nix develop -c make lint
|
||||
# env:
|
||||
# GIT_DIFF: ${{ env.GIT_DIFF }}
|
||||
# LINT_DIFF: 1
|
||||
# NIX: 1
|
||||
|
||||
Reference in New Issue
Block a user