Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .envrc-dist
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
export GITHUB_CLIENT_ID=
export GITHUB_CLIENT_SECRET=
export DATABASE_URL=postgres://auth:auth@localhost:5433/test
export AUTH_TEST_PG_HOST=localhost
export AUTH_TEST_PG_PORT=5433
export AUTH_TEST_PG_USER=auth
export AUTH_TEST_PG_PASSWORD=auth
export AUTH_TEST_PG_DB=test
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ jobs:
npm run prettier:check
npm run lint
npm run fallow
npm run db:generate
npm run db:migrate

test:
needs:
Expand Down
1 change: 1 addition & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
files:
- "test/**/*.test.js"
jobs: 1
timeout: 30
coverage-report:
- "text"
54 changes: 50 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
# Development

You can test the container setup by running `make run-dev` in the root of the repository.
## Prerequisites

This will build and start the stack:
1. Install [Apple Container](https://github.com/apple/container)
2. Start the container service:

- application container
- local s3 storage (based on RustFS)
```sh
container system start
```

## Running the app

The app automatically starts the Postgres container if needed:

```sh
npm run dev
```

Or manually manage the container:

```sh
npm run test:pg:start # Start Postgres container
npm run test:pg:stop # Stop Postgres container
npm run test:pg:status # Check container status
```

## Environment

Copy `.envrc-dist` to `.envrc` and add your GitHub OAuth credentials:

```sh
cp .envrc-dist .envrc
# Edit .envrc to add GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
# then: source .envrc (or use direnv/mise to load it)
```

The default `DATABASE_URL` points to the local Postgres container.

## Database

Run migrations after pulling new changes:

```sh
npm run db:migrate
```

## Testing

Tests automatically start the Postgres container if it's not running:

```sh
npm test
```
Loading