@@ -8,6 +8,7 @@ Composite action: install dependencies and run an npm test script.
|
||||
|---|---|---|
|
||||
| `INSTALL_CMD` | Install command | `npm ci` |
|
||||
| `TEST_SCRIPT` | npm script to run (must exist in `package.json`) | `test` |
|
||||
| `TEST_ARGS` | Additional arguments passed after `--` to the test script | `` |
|
||||
| `WORKING_DIRECTORY` | Directory to run commands in | `.` |
|
||||
|
||||
## Usage
|
||||
@@ -18,6 +19,15 @@ Composite action: install dependencies and run an npm test script.
|
||||
TEST_SCRIPT: test:unit
|
||||
```
|
||||
|
||||
With extra args:
|
||||
|
||||
```yaml
|
||||
- uses: stat-tackler/stat-tackler-infra/test/npm@main
|
||||
with:
|
||||
TEST_SCRIPT: test:coverage
|
||||
TEST_ARGS: --silent --reporter=dot --test-timeout=30000
|
||||
```
|
||||
|
||||
### Common test scripts by project
|
||||
|
||||
| Project | Script | Runner |
|
||||
|
||||
Reference in New Issue
Block a user