Install dependencies:
yarn ci
Build the project:
yarn package
Run tests:
yarn test
Format code:
yarn format
Run locally (input can be passed with environment variables, e.g. use INPUT_FOO
for the input named foo
):
yarn gh-action-start
act
allows to run workflows locally in an environment similar to a real GitHub Actions environment. See the act README for installation instructions.
For instance, we can use act
to test the run-enterprise-action.yml workflow:
- Create a JSON file for the workflow's input parameters as explained here, e.g. called
payload.json
- Create a secrets file as explained here, e.g. called
secrets
, to define theTEST_CLOUD_PROD_GATLING_CORP_START_API_TOKEN
secret containing your test API token - Run the workflow with
act workflow_dispatch --eventpath payload.json --secret-file secrets
.
See the act
README for other ideas on how to test workflows locally.
Enable debug logs with the environment variable DEBUG=true
.
Run locally (input must be passed with environment variables, e.g. GATLING_ENTERPRISE_API_TOKEN
):
yarn docker-runner-start
yarn package
docker build --tag <repository name>/enterprise-runner:latest ./docker
docker run --env GATLING_ENTERPRISE_API_TOKEN=<env> --env SIMULATION_ID=<simulation id> [other env vars...] <repository name>/enterprise-runner:latest