From 1053e27dc50a4d9ea1729bb0f067acda44db78a1 Mon Sep 17 00:00:00 2001 From: xiantang Date: Sun, 9 Nov 2025 16:07:34 +0800 Subject: [PATCH] upgrade the actions for checkout and golang and remove Windows smoke test (#808) * upgrade the actions for checkout and golang * delete the unstale windows golanglint-ci * use relative path * Update golangci-lint setup for Windows workflow * Remove Windows smoke test workflow --- .github/workflows/smoke_test.yml | 8 +--- .github/workflows/smoke_test_reuse_job.yml | 4 +- .../smoke_test_reuse_job_windows.yml | 44 ------------------- .golangci.yml | 1 - Makefile | 2 +- 5 files changed, 5 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/smoke_test_reuse_job_windows.yml diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 123c971..b3b6616 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -6,14 +6,10 @@ on: jobs: smoke_test_ubuntu: - uses: air-verse/air/.github/workflows/smoke_test_reuse_job.yml@master + uses: ./.github/workflows/smoke_test_reuse_job.yml with: run_on: ubuntu-latest smoke_test_macos: - uses: air-verse/air/.github/workflows/smoke_test_reuse_job.yml@master + uses: ./.github/workflows/smoke_test_reuse_job.yml with: run_on: macos-latest - smoke_test_windows: - uses: air-verse/air/.github/workflows/smoke_test_reuse_job_windows.yml@master - with: - run_on: windows-latest diff --git a/.github/workflows/smoke_test_reuse_job.yml b/.github/workflows/smoke_test_reuse_job.yml index eb8be75..3b1a2d5 100644 --- a/.github/workflows/smoke_test_reuse_job.yml +++ b/.github/workflows/smoke_test_reuse_job.yml @@ -13,10 +13,10 @@ jobs: runs-on: ${{ inputs.run_on }} steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Go id: go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version: ^1.25 - name: golangci-lint diff --git a/.github/workflows/smoke_test_reuse_job_windows.yml b/.github/workflows/smoke_test_reuse_job_windows.yml deleted file mode 100644 index 7482c66..0000000 --- a/.github/workflows/smoke_test_reuse_job_windows.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Reusable smoke test on Windows - -on: - workflow_call: - inputs: - run_on: - required: true - type: string - -jobs: - smoke_test: - name: Smoke test - runs-on: ${{ inputs.run_on }} - steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Setup Go - id: go - uses: actions/setup-go@v5 - with: - go-version: ^1.25 - - name: golangci-lint - uses: golangci/golangci-lint-action@v8 - with: - install-mode: goinstall - version: latest - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install depend - run: | - python -m pip install pexpect - - name: Install - run: make install - - name: Check rebuild - id: check_rebuild - working-directory: ./smoke_test - run: | - python smoke_test.py - - uses: nick-invision/assert-action@v2 - with: - expected: "PASS" - actual: ${{ steps.check_rebuild.outputs.value }} diff --git a/.golangci.yml b/.golangci.yml index def2e3b..6dc64d0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -24,7 +24,6 @@ linters: - examples$ formatters: enable: - - gci - goimports exclusions: generated: lax diff --git a/Makefile b/Makefile index 68cf6a7..7b69419 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ LDFLAGS += -X "main.airVersion=$(AIRVER)" LDFLAGS += -X "main.goVersion=$(shell go version | sed -r 's/go version go(.*)\ .*/\1/')" GO := GO111MODULE=on CGO_ENABLED=0 go -GOLANGCI_LINT_VERSION = v2.2.0 +GOLANGCI_LINT_VERSION = v2.6.1 GOLANGCI_LINT_CURRENT := $(shell golangci-lint --version 2>/dev/null | sed -n 's/.*version \([0-9.]*\).*/v\1/p') .PHONY: init