Skip to content

Bump actions/cache from 3.3.2 to 4.0.0 (#20) #28

Bump actions/cache from 3.3.2 to 4.0.0 (#20)

Bump actions/cache from 3.3.2 to 4.0.0 (#20) #28

Workflow file for this run

# Copyright 2022 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0
name: Test
on:
pull_request:
branches: [ 'main', 'release-*' ]
push:
branches: [ 'main', 'release-*' ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code onto GOPATH
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: './go.mod'
check-latest: true
- run: |
# Exclude running unit tests against third_party repos.
go test -race ./...