Skip to content

make lasers optional, off by default #1561

make lasers optional, off by default

make lasers optional, off by default #1561

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-*' ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Check out code onto GOPATH
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
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'
check-latest: true
cache: false
- name: Test
run: |
# Exclude running unit tests against third_party repos.
go test -race -timeout=5m ./...
- run: |
cd "$(mktemp -d)"
wget -O protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v28.1/protoc-28.1-linux-x86_64.zip
unzip protoc.zip -d .
chmod +x ./bin/protoc
echo "$(pwd)/bin" >> "$GITHUB_PATH"
- run: |
cd "$(mktemp -d)"
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
- name: Ensure generated files are up-to-date
run: go generate ./...
- uses: chainguard-dev/actions/nodiff@main
with:
fixup-command: go generate ./...