mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-18 04:35:53 +02:00
golangci-lint v2.9 is built with Go 1.26 and panics when type-checking dependencies that include go1.27-only source files. Co-authored-by: Cursor <cursoragent@cursor.com>
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
- pull_request
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go: ["stable"]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: go test -v ./...
|
|
lint:
|
|
strategy:
|
|
matrix:
|
|
go: ["stable"]
|
|
os: [ubuntu-latest]
|
|
name: lint
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
cache: false
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
|
# v2.13 is built with Go 1.27 so it can type-check deps that include go1.27-only files.
|
|
version: v2.13
|
|
skip-cache: true
|