Skip to content

Fix invalid actions/setup-go SHA causing CI failures #4208

Fix invalid actions/setup-go SHA causing CI failures

Fix invalid actions/setup-go SHA causing CI failures #4208

Workflow file for this run

# Copyright The Notary Project Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: build
on:
push:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: Continuous Integration
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24']
fail-fast: true
steps:
- name: Check signed commits in PR
if: github.event_name == 'pull_request'
uses: 1Password/check-signed-commits-action@ed2885f3ed2577a4f5d3c3fe895432a557d23d52 #v1.2.0
with:
comment: One or more commits in your pull request are not signed. The Notary Project requires all commits to be signed. Please sign your commits by following the [guide](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). Thank you!
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@42a7e1b7c8cf5c0c8d05507cd91e3b8b3640f04a # v6.0.0
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Cache Go modules
uses: actions/cache@0781ae7a013985cbc9ff13fc8e46e4f2dc69cf0e # v4.3.0
id: go-mod-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: make download
- name: Build
run: make build
- name: Run unit tests
run: make test
- name: Run e2e tests
run: |
if [[ $GITHUB_REF_NAME == v* && $GITHUB_REF_TYPE == tag ]]; then
make e2e
else
make e2e-covdata
fi
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@21f4c9e6b9abbcd7b88f5d9a67fa4984a502af9a # v5.5.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}