Skip to content

Commit

Permalink
Add documentation on testing frontmatter (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawalt authored Jul 10, 2024
1 parent a0edf26 commit 158b807
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion internal/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### `Internal/`
## `Internal/`

This is internal repository and documentation management code. It does not contain examples.

### Frontmatter

Examples have frontmatter that control testing and deployment behavior. Fields:

- `deploy`: If `true`, the example is deployed to the website with `modal deploy`. If `false`, it is not. Default is `false`.
- `cmd`: The command to run the example for testing. Default is `["modal", "run", "<filename>"]`.
- `args`: Arguments to pass to the command. Default is `[]`.
- `lambda-test`: If `true`, the example is tested with the cli command provided in `cmd`. If `false`, it is not. Default is `true`.
- `runtimes`: Control which runtimes the example is executed on in synthetic monitoring. Default is `["runc", "gvisor"]`.

Example for a web app. Note that here we `modal serve` in the test so as to not deploy to prod when testing.

```yaml
deploy: true
cmd: ["modal", "serve", "10_integrations/pushgateway.py"]
```

0 comments on commit 158b807

Please sign in to comment.