Skip to content

Bump actions/cache from 4.0.2 to 4.1.0 #31

Bump actions/cache from 4.0.2 to 4.1.0

Bump actions/cache from 4.0.2 to 4.1.0 #31

Workflow file for this run

# Copyright 2021 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0
name: Test
on:
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code onto GOPATH
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.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@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: './go.mod'
- run: |
# We limit the depth to 3 mostly to avoid go.mod files that get pulled into `third_party` like some hashicorp repos.
for dir in $(find . -name go.mod -maxdepth 3 -exec dirname {} \; ); do
echo "::group:: $dir"
pushd $dir
# Exclude running unit tests against third_party repos.
go test -race $(go list ./... | grep -v third_party/)
popd
echo ::endgroup::
done