Skip to content

handle cache properly and update package version #71

handle cache properly and update package version

handle cache properly and update package version #71

Workflow file for this run

name: test
on:
push:
branches:
- "main"
- "feature/**"
pull_request:
branches:
- "main"
jobs:
test:
strategy:
matrix:
platform:
- "ubuntu-latest"
# - 'macos-latest'
# - 'windows-latest'
go-version:
- "1.23.x"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # to retrieve git tags
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- uses: actions/cache/restore@v4
id: go-cache
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Run CI tests
shell: bash
run: |
make ci-test
- uses: actions/cache/save@v4
if: github.ref_name == 'main'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ steps.go-cache.outputs.cache-primary-key }}