diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0428722cbdb9d457929f96d3497db9a9c917a5ca..784dbbd75b7f6ed8848fe01e53c3f240421d39c3 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 82ef0865be62df4af6b5118701f55ac60d8a5dfc..6f31b875e32195f7a0befc9dbf4e21db07605bb1 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 97fa9fdaafa7dfe219b9cacf54b0a093c15993dc..af37f46cee498521e249ebf186c15fc9d04f513b 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 11f1290b6d80a714a179be02660c2d500ee98ec6..ac69457d589fda79ec29167679a11986361a695e 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 5552cab09f4ce930c0160ad8de9865df15b5a117..f505d096dab77d12a32a478fff592bcfed55ecc8 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,