Merge pull request #89 from nextmv-io/merschformann/upgrade-nextroute #545
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: go lint | |
on: [push] | |
jobs: | |
community-apps-go-lint: | |
runs-on: ubuntu-latest | |
# Use a matrix strategy to test all the modules simultaneously. | |
strategy: | |
fail-fast: false | |
matrix: | |
MOD_PATH: | |
[ | |
./go-hello-world, | |
./go-highs-knapsack, | |
./go-highs-orderfulfillment, | |
./go-highs-shiftscheduling, | |
./go-nextroute, | |
] | |
steps: | |
- name: git clone | |
uses: actions/checkout@v4 | |
- name: set go version | |
run: | | |
export GO_VERSION=$(yq '.language-support.go.version' workflow-configuration.yml) | |
echo "This is the Go version => $GO_VERSION" | |
echo "GO_VERSION=${GO_VERSION}" >> $GITHUB_ENV | |
working-directory: .nextmv/ | |
- name: set up go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: v1.56.2 | |
working-directory: ${{ matrix.MOD_PATH }} | |
go-lint-success: | |
runs-on: ubuntu-latest | |
needs: community-apps-go-lint | |
if: ${{ needs.community-apps-go-lint.result == 'success' }} | |
steps: | |
- name: Notify success | |
run: | | |
echo "All linting passed" >> $GITHUB_STEP_SUMMARY |