From 62ed167b281490b95c445641eb6c047d54e570c4 Mon Sep 17 00:00:00 2001 From: Florian Vogt Date: Tue, 28 Nov 2023 21:30:12 +0100 Subject: [PATCH] Update test actions (#26) --- .github/workflows/test.yml | 50 +++++++++++++++----------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbd7b18..a35267f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,11 @@ jobs: golangci: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 - with: - go-version: '1.17' - - uses: actions/checkout@v3 - + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: false - name: lint uses: golangci/golangci-lint-action@v3 with: @@ -30,17 +29,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-go@v3 - with: - go-version: 1.19.x + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: 'stable' - - name: Run coverage - run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... + - name: Run coverage + run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... - - name: Upload coverage to Codecov - run: bash <(curl -s https://codecov.io/bash) + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) test: strategy: @@ -56,21 +54,13 @@ jobs: name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x' runs-on: ${{ matrix.platform }}-latest steps: - - - uses: actions/checkout@v3 - - - uses: actions/setup-go@v3 - with: - go-version: 1.${{ matrix.go }}.x - - - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x- + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: 1.${{ matrix.go }}.x - - name: Build - run: go build -tags timetzdata -v ./... + - name: Build + run: go build -tags timetzdata -v ./... - - name: Test - run: go test -tags timetzdata -v ./... + - name: Test + run: go test -tags timetzdata -v ./...