Action to quickly test Looking Glass behavior when altering payload data
Configuration is easy!
- Create a new workflow file in the repo you wish to use for testing
- Add the following contents to the repo
name: Looking Glass Payload Tester
on:
workflow_dispatch:
inputs:
filename:
description: "string for a filename if your payload needs one"
required: true
is_correct:
description: "a boolean value for the isCorrect field"
required: true
level:
description: "string value of a supported Looking Glass level"
required: true
display_type:
description: "string value of a supported Looking Glass display type"
required: true
msg:
description: "string value of a message if your payload has one, can be an empty string"
required: true
error_expected:
description: "string value of the error.expected field of a Looking Glass payload"
required: true
error_got:
description: "string value of the error.got field of a Looking Glass payload"
required: true
jobs:
create_payload:
runs-on: ubuntu-latest
steps:
- uses: githubtraining/[email protected]
id: events
with:
filename: ${{ github.event.inputs.filename }}
isCorrect: ${{ github.event.inputs.is_correct }}
level: ${{ github.event.inputs.level }}
display_type: ${{ github.event.inputs.display_type }}
msg: ${{ github.event.inputs.msg }}
error_expected: ${{ github.event.inputs.error_expected }}
error_got: ${{ github.event.inputs.error_got }}
- uses: githubtraining/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
feedback: ${{ steps.events.outputs.reports }}
- Click the actions tab of your repository
- Select the
Looking Glass Payload Tester
from the list of configured workflows (if you changed the contents of the example file above your's may be named differently)
- Click the
Run workflow
button on the upper right corner of the middle section of your screen and supply your input values to create a payload Looking Glass can understand
- Click the green
Run workflow
button to execute the workflow - Check your actions logs and other payload
diaplay_types
for Looking Glass feedback 🎉
It is useful to enable actions debugging while working with Looking Glass as an author. To do so set the proper repository secrets!