From 811760eb3474d8a9be1caf5d9728d137ee084129 Mon Sep 17 00:00:00 2001 From: Pritesh Bandi Date: Tue, 23 Jan 2024 07:23:08 -0800 Subject: [PATCH] update build.yml Signed-off-by: Pritesh Bandi --- .github/workflows/build.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13b9b7f..8fca6ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,30 @@ name: Build on: push: - branches: main pull_request: - branches: main + +permissions: + contents: read jobs: build: - uses: notaryproject/notation-core-go/.github/workflows/reusable-build.yml@main - with: - run-e2e-tests: true + strategy: + matrix: + go-version: [ "1.20", "1.21" ] + fail-fast: true + steps: + - name: Set up Go ${{ matrix.go-version }} + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: ${{ matrix.go-version }} + check-latest: true + - name: Check out code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Build + run: make build + - name: Run unit tests + run: make test + - name: Run e2e tests + run: make e2e + - name: Upload coverage to codecov.io + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4