Skip to content

Cache dependencies

Cache dependencies #37

Workflow file for this run

name: Test
on:
push:
paths-ignore:
- "**.md"
- "LICENSE"
pull_request:
paths-ignore:
- "**.md"
- "LICENSE"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ["1.20", "1.21", "1.22"]
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -race