diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0428722c..784dbbd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: env: POSTGRES_PASSWORD: postgres ports: - - 5432:5432 + - 5433:5432 # set health checks to wait until postgres has started options: >- --health-cmd pg_isready @@ -32,7 +32,7 @@ jobs: with: node-version: 16 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2.2.2 name: Install pnpm id: pnpm-install with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82ef0865..6f31b875 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: jobs: release: + if: github.repository == 'meienberger/runtipi' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/package.json b/package.json index 97fa9fda..af37f46c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "start:rc": "docker-compose -f docker-compose.rc.yml --env-file .env up --build", "start:prod": "docker-compose --env-file .env up --build", "build:common": "cd packages/common && npm run build", - "start:pg": "docker run --name test-db -p 5432:5432 -d --rm -e POSTGRES_PASSWORD=postgres postgres", + "start:pg": "docker run --name test-db -p 5433:5432 -d --rm -e POSTGRES_PASSWORD=postgres postgres", "version": "echo $npm_package_version" }, "devDependencies": { diff --git a/packages/system-api/ormconfig.ts b/packages/system-api/ormconfig.ts index 11f1290b..ac69457d 100644 --- a/packages/system-api/ormconfig.ts +++ b/packages/system-api/ormconfig.ts @@ -3,7 +3,7 @@ import { DataSource } from 'typeorm'; export const connectionSource = new DataSource({ type: 'postgres', host: 'localhost', - port: 5432, + port: 5433, username: 'postgres', password: 'postgres', database: 'postgres', diff --git a/packages/system-api/src/test/connection.ts b/packages/system-api/src/test/connection.ts index 5552cab0..f505d096 100755 --- a/packages/system-api/src/test/connection.ts +++ b/packages/system-api/src/test/connection.ts @@ -4,12 +4,18 @@ import User from '../modules/auth/user.entity'; import pg from 'pg'; import Update from '../modules/system/update.entity'; +const HOST = 'localhost'; +const USER = 'postgres'; +const DATABASE = 'postgres'; +const PASSWORD = 'postgres'; +const PORT = 5433; + const pgClient = new pg.Client({ - user: 'postgres', - host: 'localhost', - database: 'postgres', - password: 'postgres', - port: 5432, + user: USER, + host: HOST, + database: DATABASE, + password: PASSWORD, + port: PORT, }); export const setupConnection = async (testsuite: string): Promise => { @@ -21,10 +27,10 @@ export const setupConnection = async (testsuite: string): Promise => const AppDataSource = new DataSource({ name: 'default', type: 'postgres', - host: 'localhost', - port: 5432, - username: 'postgres', - password: 'postgres', + host: HOST, + port: PORT, + username: USER, + password: PASSWORD, database: testsuite, dropSchema: true, logging: false,