PyTest (via Docker Compose)¶
Set up the PNPM environment and run tests using
pnpm run test
.
Inputs¶
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
container_config | string | false | "{\"image\": null}" |
Run with a custom docker image, instead of directly on Ubuntu machine. |
run_command | string | false | "test" |
The command to run: pnpm run xxx . |
working_dir | string | false | "." |
The directory containing the package.json file. |
Outputs¶
No outputs.
Secrets¶
No secrets.
Example Usage¶
Run commands directly on ubuntu-latest
machine.
jobs:
frontend-tests:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@main
with:
working_dir: src/frontend
Run using a custom container. For example Playwright:
jobs:
frontend-tests:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@main
with:
container_config: '{"image": "mcr.microsoft.com/playwright:v1.43.0"}'
working_dir: src/frontend
run_command: "test:e2e"
Last update:
July 27, 2024