Skip to content

Commit

Permalink
Merge pull request #1381 from buildpacks-community/gha-unit-setup-go
Browse files Browse the repository at this point in the history
Use actions/setup-go for unit-test workflow
  • Loading branch information
chenbh authored Nov 22, 2023
2 parents 6689bb6 + f2ba2f8 commit 7e9eaac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/actions/pack-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: setup-pack-linux
if: ${{ runner.os == 'linux' }}
uses: buildpacks/github-actions/[email protected]
Expand All @@ -46,7 +50,7 @@ runs:
KPACK_VERSION=$version
KPACK_COMMIT=$GITHUB_SHA
mkdir report
export PATH="$PATH:$(pwd)"
pack build ${{ inputs.tag }} \
--builder ${{ inputs.builder }} \
Expand All @@ -55,7 +59,7 @@ runs:
--report-output-dir . \
--cache-image ${{ inputs.tag }}-cache \
--publish ${{ inputs.additional_pack_args }}
mkdir images
digest=$(go run .github/actions/pack-build/report.go -path ./report.toml)
name=$(basename ${{ inputs.tag }})
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run tests
run: make unit-ci
- name: Report coverage
uses: codecov/[email protected]
uses: codecov/[email protected]

0 comments on commit 7e9eaac

Please sign in to comment.