diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13b9b7f..d817287 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,31 @@ 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 + runs-on: ubuntu-latest + 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