From 0d3b709dbac32033d2fd4e0b5a2f23cd33a45b56 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Sun, 14 Jul 2024 01:00:49 +0800 Subject: [PATCH 1/2] ci: validate multiple version builds and use golangci-lint-actio --- .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..0193343bef 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: 'stable' - 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 From 20f4e862214c2a88697c7f665f10bb1589918af4 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Sun, 14 Jul 2024 01:31:17 +0800 Subject: [PATCH 2/2] Fix lint --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0193343bef..e2eb9fa07f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v5 with: - go-version: 'stable' + 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