Skip to content

Commit

Permalink
add separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Jun 13, 2024
1 parent 20dd4b7 commit ff0ae63
Showing 1 changed file with 67 additions and 10 deletions.
77 changes: 67 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

env:
GO_VERSION: '1.22'
GOLANGCI_LINT_VERSION: 'v1.54'

jobs:
paths-filter:
Expand Down Expand Up @@ -63,6 +64,22 @@ jobs:
working-directory: test
run: make check-tidy

lint-test:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.test == 'true' }}
name: Lint (Test Framework)
runs-on: ubuntu-20.04
steps:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: test
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -v
# https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true

test-lint:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.lint == 'true' }}
Expand All @@ -88,6 +105,22 @@ jobs:
working-directory: lint
run: make check-tidy

lint-lint:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.lint == 'true' }}
name: Lint (Lint)
runs-on: ubuntu-20.04
steps:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: lint
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -v
# https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true

test-languageserver:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.languageserver == 'true' }}
Expand Down Expand Up @@ -121,6 +154,22 @@ jobs:
working-directory: languageserver
run: make check-tidy

lint-languageserver:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.languageserver == 'true' }}
name: Lint (Language Server)
runs-on: ubuntu-20.04
steps:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: languageserver
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -v
# https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true

test-docgen:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.docgen == 'true' }}
Expand Down Expand Up @@ -148,8 +197,24 @@ jobs:
working-directory: docgen
run: make check-tidy

lint:
name: Lint
lint-docgen:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.docgen == 'true' }}
name: Lint (Docgen)
runs-on: ubuntu-20.04
steps:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: docgen
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: -v
# https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true

check-license-headers:
name: Check license headers
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand All @@ -166,11 +231,3 @@ jobs:
${{ runner.os }}-go-
- name: Check license headers
run: make check-headers
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.54
args: -v
# https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true

0 comments on commit ff0ae63

Please sign in to comment.