Skip to content

Latest commit

 

History

History
96 lines (71 loc) · 1.72 KB

CONTRIBUTING.md

File metadata and controls

96 lines (71 loc) · 1.72 KB

Contributing

To contribute, create an issue or comment on an existing issue you would like to work on. All contributions require test coverage and must pass formatting/lint checks before being approved and merged.

Prerequisites

You must install docker, docker-compose, and deno.

Development

For development, the tests can be run with docker or deno. The GitHub actions uses the docker build to run the tests.

Docker

The build command will run deno lint and deno fmt --check to check the linting and formatting. The run command will start a postgres service and run all the tests.

make test-build
# or
docker-compose build test
docker-compose run test

Deno

To be able to run the tests, you will need to start up the postgres service.

make start
# or
docker-compose up -d postgres

For any change to get merged, it must pass linting and formatting requirements.

make check
# or
deno lint
deno fmt --check

To run the tests.

make test
# or
make test-watch
# or
deno test -A

When done you can stop the postgres service with the following command.

make stop
# or
docker-compose down

Examples

To be able to run the example scripts, you will need to start up the postgres service.

make start
# or
docker-compose up -d postgres

The examples can be run from any directory since the migrationsDir is resolved from the modules url.

deno run -A examples/postgres/migrate_basic.ts
// or
deno run -A examples/postgres/migrate.ts status

When done you can stop the postgres service with the following command.

make stop
# or
docker-compose down