Skip to content

Commit

Permalink
.github: rebuild ginkgo tests in case of cache miss
Browse files Browse the repository at this point in the history
Same as cilium#26263, but for conformance-runtime test.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras committed Jul 31, 2023
1 parent 575eb4c commit 54e9674
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/conformance-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ jobs:
- name: Set Environment Variables
uses: ./.github/actions/set-env-variables

# If any of these steps are modified, please update the copy of these
# steps further down under the 'setup-and-test' jobs.

# Load Ginkgo build from GitHub
- name: Load ginkgo runtime from GH cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
Expand Down Expand Up @@ -250,6 +253,39 @@ jobs:
path: /tmp/.ginkgo-build/
key: ${{ runner.os }}-ginkgo-runtime-${{ hashFiles('**/*.go') }}

- name: Install Go
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
# renovate: datasource=golang-version depName=go
go-version: 1.20.6

- name: Build Ginkgo
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
go install github.com/onsi/ginkgo/ginkgo@v1.16.5
mkdir -p /tmp/.ginkgo-build
- name: Build Test
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
cd test
/home/runner/go/bin/ginkgo build
strip test.test
tar -cz test.test -f test.tgz
- name: Store Ginkgo Test in GitHub cache path
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: |
mkdir -p /tmp/.ginkgo-build/
if [ -f test/test.tgz ]; then
cp test/test.tgz /tmp/.ginkgo-build/
echo "file copied"
fi
- name: Copy Ginkgo binary
shell: bash
run: |
Expand Down

0 comments on commit 54e9674

Please sign in to comment.