Skip to content

Commit

Permalink
(ci): Improve GitHub Action to linter simples
Browse files Browse the repository at this point in the history
This commit change the action in order to use a matrix to validate all samples under testdata
  • Loading branch information
camilamacedo86 committed Dec 27, 2024
1 parent 1024dc4 commit c725950
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/lint-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ on:
jobs:
lint-samples:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [
"testdata/project-v4",
"testdata/project-v4-with-plugins",
"testdata/project-v4-multigroup"
]
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Clone the code
Expand All @@ -19,15 +26,12 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Prepare ${{ matrix.folder }}
working-directory: ${{ matrix.folder }}
run: go mod tidy
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
working-directory: testdata/project-v4
args: --config .golangci.yml ./...
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
working-directory: testdata/project-v4-with-plugins
args: --config .golangci.yml ./...
working-directory: ${{ matrix.folder }}
args: --config .golangci.yml ./...

0 comments on commit c725950

Please sign in to comment.