Skip to content

Commit

Permalink
add params to the test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
vordimous committed Nov 7, 2024
1 parent 2b19c3f commit 23232c2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/reusable_test_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,30 @@ on:
required: true
description: Directory name for the example to test
type: string
zilla-image-tag:
default: latest
description: Zilla Image tag
type: string
zilla-image-artifact-name:
default: zilla-image-artifact
description: Artifact name for a Zilla Image
type: string

workflow_call:
inputs:
example-dir:
required: true
type: string
zilla-image-tag:
type: string
zilla-image-artifact-name:
type: string

jobs:
runner:
runs-on: ubuntu-latest
env:
ZILLA_VERSION: ${{ inputs.zilla-image-tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -29,6 +43,19 @@ jobs:
with:
key: docker-${{ runner.os }}-${{ inputs.example-dir }}-${{ hashFiles(format('{0}/compose.yaml', inputs.example-dir)) }}

- name: Download artifact
if: ${{ inputs.zilla-image-artifact-name != '' }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.zilla-image-artifact-name }}
path: /tmp

- name: Load image
if: ${{ inputs.zilla-image-artifact-name != '' }}
run: |
docker load --input /tmp/${{ inputs.zilla-image-artifact-name }}.tar
docker image ls -a
- name: Setup
run: ./startup.sh ${{ inputs.example-dir }}
- name: Wait for Zilla to be healthy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
get-examples-with-changes:
runs-on: ubuntu-latest
outputs:
changed_directories: ${{ steps.set-output.outputs.changed_directories }} # The `dirs` doesn't exist in the outputs of changed-files@v35 action.
changed_directories: ${{ steps.set-output.outputs.changed_directories }}
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 23232c2

Please sign in to comment.