Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 87db20c

Browse files
committed
DEVELOPMENT: add some notes
Signed-off-by: Stephan Renatus <stephan@styra.com>
1 parent 97a2a5c commit 87db20c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

DEVELOPMENT.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Development Notes
2+
3+
## Releasing
4+
5+
Currently, the workflow for releasing a new version is owned by the Speakeasy
6+
workflow setup.
7+
A new version of @styra/opa is released whenever the PR that the "Generate"
8+
workflow creates is **merged**.
9+
Those PRs are generated when a change to the code generation tooling occurrs,
10+
when the OpenAPI spec changes, or when it's forced through the GitHub Workflow
11+
UI.
12+
13+
To create a release that's not tied to a change in SE or the OpenAPI spec, go
14+
to [this workflow](https://github.com/StyraInc/opa-typescript/actions/workflows/sdk_generation.yaml)
15+
and choose "Run workflow" with branch `main` and **force** enabled.
16+
17+
The Publish workflow that runs after the resulting PR was merged will take care
18+
of:
19+
20+
1. building and pushing the NPM package (secrets are set up in the repo)
21+
2. building and pushing the typedoc docs to gh-pages.
22+
23+
## Testing
24+
25+
For testing, we use NodeJS' builtin test runner together with testcontainers-node.
26+
The tests are defined in a TS file, `tests/authorizer.test.ts`.
27+
28+
Run all tests with
29+
30+
```
31+
node --require ts-node/register --test tests/**/*.ts
32+
```
33+
34+
and with testcontainers-node's debug logging:
35+
36+
```
37+
DEBUG='testcontainers*' node --require ts-node/register --test tests/**/*.ts
38+
```

0 commit comments

Comments
 (0)