Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
Add README for both applications.

Run integration & e2e tests in band to avoid state leak.
  • Loading branch information
wcalderipe committed Jan 5, 2024
1 parent 7b8141f commit e1fbca7
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 6 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,33 @@
## Description

TBD

## Application

- [AuthZ](./apps/authz-node/README.md)
- [Orchestration](./apps/orchestration/README.md)

## Docker

We use Docker & `docker-compose` to run the application's dependencies.

```bash
make docker/up
make docker/stop
```

## Formatting

We use [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/) to
ensure code consistency. You can run the following commands to format and lint
the whole code base.

```bash
# Format and lint all the code.
make format
make lint

# Check for formatting and linting errors without fixing them.
make format/check
make lint/check
```
3 changes: 3 additions & 0 deletions apps/authz-node/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
AUTHZ_PROJECT_NAME := apps/authz-node
AUTHZ_PROJECT_DIR := ./apps/authz-node

authz/copy-default-env:
cp ${AUTHZ_PROJECT_DIR}/.env.default ${AUTHZ_PROJECT_DIR}/.env

authz/test/copy-default-env:
cp ${AUTHZ_PROJECT_DIR}/.env.test.default ${AUTHZ_PROJECT_DIR}/.env.test

Expand Down
3 changes: 3 additions & 0 deletions apps/authz-node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AuthZ

TBD
11 changes: 8 additions & 3 deletions apps/authz-node/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,26 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/authz-node/jest.unit.ts"
"jestConfig": "apps/authz-node/jest.unit.ts",
"verbose": true
}
},
"test:integration": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/authz-node/jest.integration.ts"
"jestConfig": "apps/authz-node/jest.integration.ts",
"verbose": true,
"runInBand": true
}
},
"test:e2e": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/authz-node/jest.e2e.ts"
"jestConfig": "apps/authz-node/jest.e2e.ts",
"verbose": true,
"runInBand": true
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions apps/orchestration/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ORCHESTRATION_PROJECT_NAME := apps/orchestration
ORCHESTRATION_PROJECT_DIR := ./apps/orchestration
ORCHESTRATION_DATABASE_SCHEMA := ${ORCHESTRATION_PROJECT_DIR}/src/persistence/schema/schema.prisma

orchestration/copy-default-env:
cp ${ORCHESTRATION_PROJECT_DIR}/.env.default ${ORCHESTRATION_PROJECT_DIR}/.env

orchestration/db/generate-types:
npx prisma generate \
--schema ${ORCHESTRATION_DATABASE_SCHEMA}
Expand Down
22 changes: 22 additions & 0 deletions apps/orchestration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Orchestration

## Getting started

```bash
# Boot PostgreSQL and Redis
make docker/up
make orchestration/copy-default-env
make orchestration/db/migrate
```

## Testing

Firs time? Run `orchestration/test/copy-default-env` and `make
orchestration/test/db/setup` to setup the test database.

```bash
make orchestration/test/type
make orchestration/test/unit
make orchestration/test/integration
make orchestration/test/e2e
```
11 changes: 8 additions & 3 deletions apps/orchestration/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,26 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/orchestration/jest.unit.ts"
"jestConfig": "apps/orchestration/jest.unit.ts",
"verbose": true
}
},
"test:integration": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/orchestration/jest.integration.ts"
"jestConfig": "apps/orchestration/jest.integration.ts",
"verbose": true,
"runInBand": true
}
},
"test:e2e": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/orchestration/jest.e2e.ts"
"jestConfig": "apps/orchestration/jest.e2e.ts",
"verbose": true,
"runInBand": true
}
}
},
Expand Down

0 comments on commit e1fbca7

Please sign in to comment.