add back setup command code #1
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
name: CI | |
on: [push] | |
jobs: | |
integration: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Python test | |
uses: ./ | |
id: python-test | |
with: | |
timeout: 10 | |
max-score: 100 | |
- name: Decode and assert python-test | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ github.token || 'act' }} | |
script: | | |
// Decode the Base64 output | |
const decodedResult = Buffer.from("${{ steps.python-test.outputs.result }}", 'base64').toString('utf8'); | |
console.log(`Decoded Result: ${decodedResult}`); | |
const json = JSON.parse(decodedResult) | |
if ( !json["version"] || | |
!json["status"] || | |
!json["tests"][0]["name"]) { | |
throw new Error(`Assertion failed. Expected version, status, and test name to exist, but got '${decodedResult}'`); | |
} |