From 7d11af713be31de433b5f99dd5aeb3675abe7e97 Mon Sep 17 00:00:00 2001 From: houseme Date: Sun, 11 Jun 2023 12:08:38 +0800 Subject: [PATCH] feat: improve workflows config and upgrade action version (#690) --- .github/workflows/go.yml | 22 +++++++++++++--------- .github/workflows/release.yml | 8 ++++---- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d0019fc..b8d591f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,14 +10,18 @@ jobs: golangci: strategy: matrix: - go-version: [1.16.x,1.17.x,1.18.x] + go-version: [ '1.16','1.17','1.18','1.19','1.20' ] name: golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 - - uses: actions/checkout@v3 + - name: Setup Golang ${{ matrix.go-version }} + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout + uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v3.2.0 + uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.52.2 @@ -28,7 +32,7 @@ jobs: redis: image: redis ports: - - 6379:6379 + - 6379:6379 options: --entrypoint redis-server memcached: image: memcached @@ -38,14 +42,14 @@ jobs: # strategy set strategy: matrix: - go: ["1.16", "1.17", "1.18"] + go: [ '1.16','1.17','1.18','1.19','1.20' ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} id: go - name: Test - run: go test -v -race ./... + run: go test -v -race ./... \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c97636..acbcebc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,17 +11,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.15 + go-version: 1.16 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 with: version: latest args: release --rm-dist