Skip to content

Commit

Permalink
test: fix conditional execution
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kotzbauer <[email protected]>
  • Loading branch information
ckotzbauer committed Jun 17, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a592ef5 commit 78bf604
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -54,15 +54,12 @@ jobs:
docker push ghcr.io/ckotzbauer/sbom-operator/oci-test:${DATE}
DIGEST=$(docker inspect ghcr.io/ckotzbauer/sbom-operator/oci-test:${DATE} --format='{{index .RepoDigests 0}}')
syft registry:${DIGEST} -o json > internal/target/oci/fixtures/sbom.json
TEST_LIST="$(go list ./...)"
else
TEST_LIST="$(go list ./... | grep -v internat/target/oci)"
fi
TEST_DIGEST="${DIGEST}" go test "$TEST_LIST" -coverprofile cover.out
TEST_DIGEST="${DIGEST}" go test $(go list ./...) -coverprofile cover.out
if [ "$IS_FORK" != 'true' ]; then
COSIGN_REPOSITORY="ghcr.io/ckotzbauer/sbom-operator/oci-test" cosign download sbom ${DIGEST}
else
go test $(go list ./... | grep -v internat/target/oci) -coverprofile cover.out
fi
- uses: codecov/codecov-action@v3

0 comments on commit 78bf604

Please sign in to comment.