Skip to content

Commit

Permalink
test: build cache for initial test binary
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Dec 17, 2024
1 parent 8ebd69a commit 7d31081
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/actions/setup-ci-core-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,36 @@ runs:
working-directory: ${{ inputs.go-mod-download-directory }}
run: go mod download

- name: Set go Cache Key Inputs
shell: bash
id: go-cache-inputs
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
echo "gobuildcache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "branchname=${BRANCH_NAME}" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
name: Restore go build cache for initial test binary
id: cache-restore
with:
path: |
${{ steps.go-cache-inputs.outputs.gobuildcache }}
key: ${{ runner.os }}-gobuild-core-test-binary-${{ hashFiles('./go.mod') }}-${{ steps.go-cache-inputs.outputs.branchname }}
restore-keys: |
${{ runner.os }}-gomod--core-test-binary-
- name: Build binary
shell: bash
run: go build -o chainlink.test .

- uses: actions/cache/save@v4
name: Save go build cache for initial test binary
with:
path: |
${{ steps.go-cache-inputs.outputs.gobuildcache }}
key: ${{ steps.cache-restore.outputs.cache-primary-key }}

- name: Setup DB
shell: bash
run: ./chainlink.test local db preparetest
Expand Down

0 comments on commit 7d31081

Please sign in to comment.