Improve workflow

This commit is contained in:
2023-04-16 10:19:38 +03:00
parent a1a29d4314
commit 7cd4d4097a

View File

@@ -1,7 +1,7 @@
--- ---
name: test name: test
on: "on":
pull_request: pull_request:
push: push:
branches: branches:
@@ -13,28 +13,28 @@ jobs:
steps: steps:
- name: Setup Go - name: Setup Go
uses: https://github.com/actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.20.x go-version: 1.20.x
- name: Checkout code - name: Checkout code
uses: https://github.com/actions/checkout@v3 uses: actions/checkout@v3
# - name: go mod package cache - name: go mod package cache
# uses: https://github.com/actions/cache@v3 uses: actions/cache@v3
# with: with:
# path: | path: |
# ~/.cache/go-build ~/.cache/go-build
# ~/go/pkg/mod ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: | restore-keys: |
# ${{ runner.os }}-go- ${{ runner.os }}-go-
- name: Tests - name: Tests
run: go test ./... run: go test ./...
- name: golangci-lint - name: golangci-lint
uses: https://github.com/golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v3
with: with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version # 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 version: latest