github.com/rudderlabs/rudder-go-kit@v0.30.0/.github/workflows/verify.yml (about) 1 name: Verify 2 on: 3 push: 4 tags: 5 - v* 6 branches: 7 - master 8 - main 9 pull_request: 10 concurrency: 11 group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} 12 cancel-in-progress: true 13 jobs: 14 generate: 15 name: generated files 16 runs-on: ubuntu-latest 17 steps: 18 - uses: actions/checkout@v2 19 - uses: actions/setup-go@v3 20 with: 21 check-latest: true 22 cache: true 23 go-version: '~1.21.0' 24 - run: go version 25 26 - run: go mod tidy 27 - run: git diff --exit-code go.mod 28 - name: Error message 29 if: ${{ failure() }} 30 run: echo '::error file=go.mod,line=1,col=1::Inconsistent go mod file. Ensure you have run `go mod tidy` and committed the files locally.'; echo '::error file=enterprise_mod.go,line=1,col=1::Possible missing enterprise exclusive dependencies.' 31 32 - run: make generate 33 - run: git diff --exit-code 34 - name: Error message 35 if: ${{ failure() }} 36 run: echo '::error file=Makefile,line=11,col=1::Incorrectly generated files. Ensure you have run `make generate` and committed the files locally.' 37 38 - run: make fmt 39 - run: git diff --exit-code 40 - name: Error message 41 if: ${{ failure() }} 42 run: echo 'Not formatted files. Ensure you have run `make fmt` and committed the files locally.' 43 linting: 44 name: lint 45 runs-on: ubuntu-latest 46 steps: 47 - uses: actions/checkout@v3 48 - uses: actions/setup-go@v3 49 with: 50 go-version: '~1.21.0' 51 check-latest: true 52 cache: true 53 - name: golangci-lint 54 uses: golangci/golangci-lint-action@v3 55 with: 56 version: v1.55.2