Skip to content

Add integration

Add integration #1

Workflow file for this run

name: CI
on: [push]
jobs:
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: echo-test
with:
test-name: "echo test"
setup-command: "echo 'Getting Setup'"
command: "echo 'Hello, World'"
- name: Decode and assert echo-test
uses: actions/github-script@v3
with:
github-token: ${{ github.token || 'act' }}
script: |
// Decode the Base64 output
const decodedResult = Buffer.from("${{ steps.echo-test.outputs.result }}", 'base64').toString('utf8');
console.log(`Decoded Result: ${decodedResult}`);
const json = JSON.parse(decodedResult)
if ( json["version"] != 1 &&
json["status"] != "pass" &&
json["tests"][0]["name"] != "echo test") {
throw new Error(`Assertion failed. Expected 'expected value', but got '${decodedResult}'`);
}