From 14d93f3bb6ead2a3c9112ad13ecd71c9360f1aba Mon Sep 17 00:00:00 2001 From: Evgenii Baidakov Date: Thu, 5 Oct 2023 16:01:29 +0400 Subject: [PATCH] workflow: Update tests pipeline Signed-off-by: Evgenii Baidakov --- .github/workflows/tests.yml | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5de0083..61de651 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,7 @@ on: pull_request: branches: - master - types: [opened, synchronize] + types: [ opened, synchronize ] paths-ignore: - '**/*.md' @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: @@ -27,21 +27,16 @@ jobs: env: CGO_ENABLED: 1 steps: - - 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: + cache: true go-version: 1.19 - - name: Restore Go modules from cache - uses: actions/cache@v2 - with: - path: /home/runner/go/pkg/mod - key: deps-${{ hashFiles('go.sum') }} - - name: Test and write coverage profile run: make cover @@ -57,23 +52,18 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - go_versions: [ '1.17', '1.18', '1.19' ] + go_versions: [ '1.19', '1.20', '1.21' ] fail-fast: false steps: - - 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: + cache: true go-version: '${{ matrix.go_versions }}' - - name: Restore Go modules from cache - uses: actions/cache@v2 - with: - path: /home/runner/go/pkg/mod - key: deps-${{ hashFiles('go.sum') }} - - name: Run tests run: make test