github.com/MerlinKodo/quic-go@v0.39.2/.github/workflows/lint.yml (about) 1 on: [push, pull_request] 2 3 jobs: 4 check: 5 runs-on: ubuntu-latest 6 steps: 7 - uses: actions/checkout@v4 8 - uses: actions/setup-go@v4 9 with: 10 skip-pkg-cache: true 11 go-version: "1.20.x" 12 - name: Check that no non-test files import Ginkgo or Gomega 13 run: .github/workflows/no_ginkgo.sh 14 - name: Check for //go:build ignore in .go files 15 run: | 16 IGNORED_FILES=$(grep -rl '//go:build ignore' . --include='*.go') || true 17 if [ -n "$IGNORED_FILES" ]; then 18 echo "::error::Found ignored Go files: $IGNORED_FILES" 19 exit 1 20 fi 21 - name: Check that go.mod is tidied 22 if: success() || failure() # run this step even if the previous one failed 23 run: | 24 cp go.mod go.mod.orig 25 cp go.sum go.sum.orig 26 go mod tidy 27 diff go.mod go.mod.orig 28 diff go.sum go.sum.orig 29 - name: Run code generators 30 if: success() || failure() # run this step even if the previous one failed 31 run: .github/workflows/go-generate.sh 32 - name: Check that go mod vendor works 33 if: success() || failure() # run this step even if the previous one failed 34 run: | 35 cd integrationtests/gomodvendor 36 go mod vendor 37 golangci-lint: 38 runs-on: ubuntu-latest 39 steps: 40 - uses: actions/checkout@v4 41 - uses: actions/setup-go@v4 42 with: 43 go-version: "1.20.x" 44 - name: golangci-lint (Linux) 45 uses: golangci/golangci-lint-action@v3 46 with: 47 skip-pkg-cache: true 48 args: --timeout=3m 49 version: v1.52.2 50 - name: golangci-lint (Windows) 51 if: success() || failure() # run this step even if the previous one failed 52 uses: golangci/golangci-lint-action@v3 53 env: 54 GOOS: "windows" 55 with: 56 skip-pkg-cache: true 57 args: --timeout=3m 58 version: v1.52.2 59 - name: golangci-lint (OSX) 60 if: success() || failure() # run this step even if the previous one failed 61 uses: golangci/golangci-lint-action@v3 62 env: 63 GOOS: "darwin" 64 with: 65 skip-pkg-cache: true 66 args: --timeout=3m 67 version: v1.52.2 68 - name: golangci-lint (FreeBSD) 69 if: success() || failure() # run this step even if the previous one failed 70 uses: golangci/golangci-lint-action@v3 71 env: 72 GOOS: "freebsd" 73 with: 74 skip-pkg-cache: true 75 args: --timeout=3m 76 version: v1.52.2 77 - name: golangci-lint (others) 78 if: success() || failure() # run this step even if the previous one failed 79 uses: golangci/golangci-lint-action@v3 80 env: 81 GOOS: "solaris" # some OS that we don't have any build tags for 82 with: 83 skip-pkg-cache: true 84 args: --timeout=3m 85 version: v1.52.2