This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
Includes SHA2-384 and SHA2-512 digests in the endorsement statement #1037
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-all: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '=1.18.4' | |
- name: Build | |
run: | | |
go build ./... | |
- name: Test | |
run: | | |
go test ./... | |
- name: endorser-e2e | |
run: | | |
go run cmd/endorser/main.go \ | |
--binary_path=testdata/binary \ | |
--binary_name=stage0_bin \ | |
--provenance_uris=https://ent-server-62sa4xcfia-ew.a.run.app/raw/sha2-256:94f2b47418b42dde64f678a9d348dde887bfe4deafc8b43f611240fee6cc750a \ | |
--verification_options=testdata/skip_verification.textproto | |
# TODO(#113): Find a better, and easier-to-navigate way to report coverage. | |
# Generate coverage report for ./pkg/... and ./internal/... and upload the report as an html file. | |
# See `go help testflag` and `go tool cover -help` for more options. | |
test-coverage: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '=1.18.4' | |
- name: Run go test | |
run: | | |
go test -coverpkg=./... -coverprofile coverage.out ./pkg/... ./internal/... | |
go tool cover -func=coverage.out | |
go tool cover -html=coverage.out -o coverage.html | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage.html | |
path: coverage.html | |
check-license-lines: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check License Lines | |
uses: kt3k/[email protected] | |
formatting: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '=1.18.4' | |
- name: Run go fmt | |
run: | | |
./scripts/formatting.sh | |
linting: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '=1.18.4' | |
- name: Run golint | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
./scripts/linting.sh | |
vetting: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '=1.18.4' | |
- name: Run go vet | |
run: | | |
go vet ./... |