From d18918c10f17ba5e044c5bc38f614ce0d3b27d41 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Sun, 14 Jul 2024 12:03:08 +0800 Subject: [PATCH] ci: validate multiple version builds and use golangci-lint-action (#1250) * ci: validate multiple version builds and use golangci-lint-actio * Fix lint (cherry picked from commit 2ff2c2cdafe71d72a5d3b69680f3086301510f4b) --- .github/workflows/ci.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a6731f969..e2eb9fa07f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,25 +20,35 @@ on: [pull_request] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.20', '1.21', '1.22' ] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} - run: make build lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-go@v5 + with: + go-version: '1.20' - name: Check license header run: docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v3 check - name: Run golangci-lint - run: make lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.51.2 integration-tests: runs-on: ubuntu-latest strategy: matrix: - go-version: ['1.20', '1.21.0', '1.22.0'] + go-version: [ '1.20', '1.21', '1.22' ] steps: - uses: actions/checkout@v3 - name: clean docker cache