You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task 2 was partially completed within that PR in that there was an action.yml file included. I removed that action.yml file for now as it seems to me like it shouldn't work. It is included in full in this comment: Create (and document) GitHub Action to integrate with Docker image #682 (comment). It seems like this action.yml, as it currently stands, shouldn't work because the config arg isn't used in the runs: step.
To get this to work, you (the implementer) may need to update config to instead use the INPUT_CONFIG logic that is documented in README.md (once this PR is merged: feat: Add Docker support #597).
Task 2: Create and document GitHub Action to integrate with Docker image
Assuming dev.json is renamed openactive-test-suite-config.json and exists in a directory named example-booking-system in the GitHub workspace, and assuming that within the GitHub action the app is running on http://localhost:8081/ then the following should work currently, and output the resulting cert to conformance/ in the current workspace
- name: Run OpenActive Test Suite
uses: openactive/openactive-test-suite@d7cbdac7f03ce75f282927fe67c9a375f1e440a8
with:
config: example-booking-system/openactive-test-suite-config.json
NODE_CONFIG: |
{ "ci": true, "consoleOutputLevel": "detail", "broker": {"datasetSiteUrl": "http://localhost:8081/openactive", "outputPath": "/github/workspace/output/"}, "integrationTests": {"testDatasetIdentifier": "github-ci", "outputPath": "/github/workspace/output/", "generateConformanceCertificate": true, "conformanceCertificatePath": "/github/workspace/conformance/", "conformanceCertificateId": "https://openactive-certificate.example.com/" }}
NODE_ENV: openactive-test-suite-config
- name: Upload OpenActive Test Suite output as artifact for debugging
uses: actions/upload-artifact@v2
if: ${{ success() || failure() }}
with:
name: openactive-test-suite
path: ./output/
Ensure that all of the above works and is clearly documented at the appropriate levels within README.md and also developer.openactive.io
The text was updated successfully, but these errors were encountered:
lukehesluke
changed the title
Better documentation for how to run test suite with docker, and also with GitHub Actions
Create GitHub Action to integrate with Docker image and document it
Apr 2, 2024
lukehesluke
changed the title
Create GitHub Action to integrate with Docker image and document it
Create (and document) GitHub Action to integrate with Docker image
Apr 2, 2024
name: 'OpenActive Test Suite'description: 'Test suite for OpenActive implementations'inputs:
args: # id of inputdescription: 'Arguments to pass to `npm start` of OpenActive Test Suite'required: falsedefault: ''config: # id of inputdescription: 'The path of a config file to copy into ./config/ of OpenActive Test Suite'required: falsedefault: ''NODE_CONFIG: # id of inputdescription: 'JSON configuration string to pass into OpenActive Test Suite'required: truedefault: '{ "ci": true }'NODE_ENV: # id of inputdescription: 'Value of NODE_ENV environment variable to pass into OpenActive Test Suite'required: falsedefault: ''NODE_APP_INSTANCE: # id of inputdescription: 'Value of NODE_APP_INSTANCE environment variable to pass into OpenActive Test Suite'required: falsedefault: ''runs:
using: 'docker'image: 'docker://ghcr.io/openactive/test-suite:latest'args:
- ${{ inputs.args }}env:
FORCE_COLOR: 1NODE_CONFIG: ${{ inputs.NODE_CONFIG }}NODE_ENV: ${{ inputs.NODE_ENV }}NODE_APP_INSTANCE: ${{ inputs.NODE_APP_INSTANCE }}
CURRENT STATUS (written by @lukehesluke)
config
arg isn't used in theruns:
step.config
to instead use theINPUT_CONFIG
logic that is documented in README.md (once this PR is merged: feat: Add Docker support #597).SO, this is what needs to be done for this issue:
action.yml
, based off of Create (and document) GitHub Action to integrate with Docker image #682 (comment), but fixing theconfig
arg.action.yml
, using the example provided in ORIGINAL COMMENT > Task 2ORIGINAL COMMENT (written by @nickevansuk)
Task 1: Fully document the docker run call
Explain all of the following:
And potentially simplify this command too
Task 2: Create and document GitHub Action to integrate with Docker image
Assuming dev.json is renamed openactive-test-suite-config.json and exists in a directory named example-booking-system in the GitHub workspace, and assuming that within the GitHub action the app is running on http://localhost:8081/ then the following should work currently, and output the resulting cert to conformance/ in the current workspace
Ensure that all of the above works and is clearly documented at the appropriate levels within README.md and also developer.openactive.io
The text was updated successfully, but these errors were encountered: