From 7cd4d4097a8bff912f5a930160b7e4868d949ff3 Mon Sep 17 00:00:00 2001 From: derfenix Date: Sun, 16 Apr 2023 10:19:38 +0300 Subject: [PATCH] Improve workflow --- .github/workflows/test.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ec090cc..bd27deb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,7 +1,7 @@ --- name: test -on: +"on": pull_request: push: branches: @@ -13,28 +13,28 @@ jobs: steps: - name: Setup Go - uses: https://github.com/actions/setup-go@v3 + uses: actions/setup-go@v3 with: go-version: 1.20.x - name: Checkout code - uses: https://github.com/actions/checkout@v3 + uses: actions/checkout@v3 -# - name: go mod package cache -# uses: https://github.com/actions/cache@v3 -# with: -# path: | -# ~/.cache/go-build -# ~/go/pkg/mod -# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} -# restore-keys: | -# ${{ runner.os }}-go- + - name: go mod package cache + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Tests run: go test ./... - name: golangci-lint - uses: https://github.com/golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v3 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: latest