forked from aklivity/zilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Test Zilla Example | ||
description: Starts and Runs the test.sh script for a specificy example folder in the zilla-examples repo | ||
inputs: | ||
example-dir: # id of input | ||
description: 'Directory of the example to test' | ||
required: true | ||
default: '' | ||
outputs: | ||
result: | ||
description: "testing results" | ||
value: ${{ steps.test-executor.outputs.result }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: zilla-image | ||
path: /tmp | ||
|
||
- name: Load image | ||
shell: bash | ||
run: | | ||
docker load --input /tmp/zilla.tar | ||
docker image ls -a | ||
- name: Checkout docs repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: aklivity/zilla-examples | ||
ref: refs/heads/example-startup-compose | ||
|
||
- name: Startup | ||
shell: bash | ||
env: | ||
ZILLA_VERSION: develop-SNAPSHOT | ||
ZILLA_PULL_POLICY: never | ||
run: ./startup.sh ${{ inputs.example-dir }} | ||
|
||
- name: Execute Test | ||
shell: bash | ||
id: test-executor | ||
working-directory: openapi.proxy | ||
run: | | ||
set -o pipefail | ||
./test.sh | tee $GITHUB_STEP_SUMMARY | ||
- name: Collect docker logs on failure | ||
if: failure() | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
dest: './logs' | ||
- name: Tar logs | ||
shell: bash | ||
if: failure() | ||
run: tar cvzf ./logs.tgz ./logs | ||
- name: Upload logs to GitHub | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs.tgz | ||
path: ./logs.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters