From 5b9c2ce533c664e0feca491a1c11fcde28f5c940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Fri, 23 Feb 2024 20:11:15 +0100 Subject: [PATCH] Update Github test actions (#85) --- .github/workflows/tests.yml | 40 ++++++++++++------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9d5b625..972cfb2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,51 +20,37 @@ jobs: matrix: go-version: [1.18.x, 1.x] steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - uses: WillAbides/setup-go-faster@v1 - with: - go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 with: - # In order: - # * Module download cache - # * Build cache (Linux) - # * Build cache (Mac) - # * Build cache (Windows) - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - %LocalAppData%\go-build - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version: ${{ matrix.go-version }} - name: Test with race and coverage run: | go test -race -coverprofile=coverage.out -covermode=atomic go tool cover -func=coverage.out - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: files: ./coverage.out + token: ${{ secrets.CODECOV_TOKEN }} # required lint: name: "Run static analysis" runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - uses: WillAbides/setup-go-faster@v1 + - uses: actions/checkout@v4 + + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v5 with: go-version: "1.x" - run: "go vet ./..." - - uses: dominikh/staticcheck-action@v1 + - name: Staticcheck + uses: dominikh/staticcheck-action@v1.3.0 with: - version: "2022.1.3" + install-go: false