diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index a1eb5096..ce1d8d63 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -40,28 +40,19 @@ jobs: attestations: "github" command: go vet ./... - test: + tests: needs: [fmt, static_analysis] uses: ./.github/workflows/witness.yml with: pull_request: ${{ github.event_name == 'pull_request' }} - step: "test" - attestations: "github" - command: go test -v -coverprofile=profile.cov -covermode=atomic ./... - - e2e-tests: - needs: test - uses: ./.github/workflows/witness.yml - with: - pull_request: ${{ github.event_name == 'pull_request' }} - step: "e2e" + step: "tests" attestations: "github" command: | make clean make test release: - needs: e2e-tests + needs: tests permissions: id-token: write contents: write diff --git a/.github/workflows/witness.yml b/.github/workflows/witness.yml index 777d793d..b880b2ec 100644 --- a/.github/workflows/witness.yml +++ b/.github/workflows/witness.yml @@ -48,5 +48,9 @@ jobs: step: ${{ inputs.step }} attestations: ${{ inputs.attestations }} command: /bin/sh -c "${{ inputs.command }}" + - if: ${{ inputs.pull_request == true }} run: ${{ inputs.command }} + + - if: ${{ inputs.step == 'tests' }} + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d