Skip to content

Commit

Permalink
chore(ci): Fixes issue with lint in releases (#784)
Browse files Browse the repository at this point in the history
- Lets the 'current' module be added for linting and unit tests only.
- Tests of other modules still use the reduced go.work
- Disables the fmt and mod tidy up to date checks on release branches
  • Loading branch information
dmihalcik-virtru authored May 13, 2024
1 parent c19ef05 commit a1278ed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: "Checks"

env:
IS_RELEASE_BRANCH: ${{ startsWith(github.head_ref, 'release-please-') }}

on:
pull_request:
branches:
Expand Down Expand Up @@ -81,12 +84,15 @@ jobs:
protocol/go/go.sum
sdk/go.sum
service/go.sum
- if: startsWith(github.head_ref, 'release-please-')
- if: env.IS_RELEASE_BRANCH == 'true'
run: ./.github/scripts/work-init.sh
- run: go mod download
working-directory: ${{ matrix.directory }}
- run: go mod verify
working-directory: ${{ matrix.directory }}
- run: go work use .
if: env.IS_RELEASE_BRANCH == 'true'
working-directory: ${{ matrix.directory }}
- name: golangci-lint
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc
with:
Expand Down Expand Up @@ -120,6 +126,7 @@ jobs:
- run: git diff-files --ignore-submodules
- name: Check that files have been formatted before PR submission; see above for error details
run: git diff-files --quiet --ignore-submodules
if: env.IS_RELEASE_BRANCH == 'false'

integration:
name: integration tests
Expand All @@ -140,7 +147,7 @@ jobs:
examples/go.sum
protocol/go/go.sum
sdk/go.sum
- if: startsWith(github.head_ref, 'release-please-')
- if: env.IS_RELEASE_BRANCH == 'true'
run: ./.github/scripts/work-init.sh
- run: go mod download
- run: go mod verify
Expand Down

0 comments on commit a1278ed

Please sign in to comment.