mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Separate migrations from test
This commit is contained in:
parent
0e5de28a45
commit
a3d536fcf1
2 changed files with 14 additions and 3 deletions
14
.github/workflows/run-tests.yaml
vendored
14
.github/workflows/run-tests.yaml
vendored
|
|
@ -63,6 +63,16 @@ jobs:
|
|||
run: |
|
||||
source ~/.nvm/nvm.sh
|
||||
yarn install --frozen-lockfile
|
||||
- name: Database Migration
|
||||
run: |
|
||||
yarn workspace @omnivore/db migrate
|
||||
psql --host localhost --port ${{ job.services.postgres.ports[5432] }} --user postgres --password -c "CREATE USER app_user WITH ENCRYPTED PASSWORD 'app_pass';GRANT omnivore_user to app_user;"
|
||||
env:
|
||||
PG_HOST: localhost
|
||||
PG_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||
PG_USER: postgres
|
||||
PG_PASSWORD: postgres
|
||||
PG_DB: omnivore_test
|
||||
- name: TypeScript, Lint, Tests
|
||||
run: |
|
||||
source ~/.nvm/nvm.sh
|
||||
|
|
@ -72,8 +82,8 @@ jobs:
|
|||
env:
|
||||
PG_HOST: localhost
|
||||
PG_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||
PG_USER: postgres
|
||||
PG_PASSWORD: postgres
|
||||
PG_USER: app_user
|
||||
PG_PASSWORD: app_pass
|
||||
PG_DB: omnivore_test
|
||||
PG_POOL_MAX: 10
|
||||
ELASTIC_URL: http://localhost:${{ job.services.elastic.ports[9200] }}/
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ const runMigrations = async () => {
|
|||
}
|
||||
|
||||
export const createTestConnection = async (): Promise<void> => {
|
||||
await runMigrations()
|
||||
// need to manually run migrations before creating the connection
|
||||
// await runMigrations()
|
||||
|
||||
AppDataSource.setOptions({
|
||||
type: 'postgres',
|
||||
|
|
|
|||
Loading…
Reference in a new issue