Files
quic-go/.github/workflows/lint.yml
dependabot[bot] fb82d0da00 ci: bump actions/checkout from 4 to 5 (#5293)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 04:53:15 +02:00

86 lines
2.9 KiB
YAML

on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: "1.25.x"
- name: Check for //go:build ignore in .go files
run: |
IGNORED_FILES=$(grep -rl '//go:build ignore' . --include='*.go') || true
if [ -n "$IGNORED_FILES" ]; then
echo "::error::Found ignored Go files: $IGNORED_FILES"
exit 1
fi
- name: Check that go.mod is tidied
if: success() || failure() # run this step even if the previous one failed
run: |
cp go.mod go.mod.orig
cp go.sum go.sum.orig
go mod tidy
diff go.mod go.mod.orig
diff go.sum go.sum.orig
- name: Run code generators
if: success() || failure() # run this step even if the previous one failed
run: .github/workflows/go-generate.sh
- name: Check that go mod vendor works
if: success() || failure() # run this step even if the previous one failed
run: |
cd integrationtests/gomodvendor
go mod vendor
golangci-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: [ "1.24.x", "1.25.x" ]
env:
GOLANGCI_LINT_VERSION: v2.4.0
name: golangci-lint (Go ${{ matrix.go }})
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: golangci-lint (Linux)
uses: golangci/golangci-lint-action@v8
with:
args: --timeout=3m
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (Windows)
if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v8
env:
GOOS: "windows"
with:
args: --timeout=3m
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (OSX)
if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v8
env:
GOOS: "darwin"
with:
args: --timeout=3m
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (FreeBSD)
if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v8
env:
GOOS: "freebsd"
with:
args: --timeout=3m
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: golangci-lint (others)
if: success() || failure() # run this step even if the previous one failed
uses: golangci/golangci-lint-action@v8
env:
GOOS: "solaris" # some OS that we don't have any build tags for
with:
args: --timeout=3m
version: ${{ env.GOLANGCI_LINT_VERSION }}