diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ebe91923..9b5dfbd8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,6 +10,17 @@ on: jobs: validations: runs-on: ubuntu-latest + env: + DATABASE_URL: postgresql://sill:pg_password@localhost:5432/sill + services: + postgres: + image: postgres:16-alpine + env: + POSTGRES_USER: sill + POSTGRES_PASSWORD: pg_password + POSTGRES_DB: sill + ports: + - 5432:5432 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -18,6 +29,8 @@ jobs: - uses: bahmutov/npm-install@v1 - name: Build back run: cd api && yarn build + - name: Migrate db + run: yarn migrate latest - name: Fullcheck run: yarn fullcheck # diff --git a/api/src/core/adapters/dbApi/kysely/pgDbApi.integration.test.ts b/api/src/core/adapters/dbApi/kysely/pgDbApi.integration.test.ts index 8de6b431..3f73e313 100644 --- a/api/src/core/adapters/dbApi/kysely/pgDbApi.integration.test.ts +++ b/api/src/core/adapters/dbApi/kysely/pgDbApi.integration.test.ts @@ -70,7 +70,7 @@ const similarSoftwareExternalData: SoftwareExternalData = { license: "MIT" }; -const db = new Kysely({ dialect: createPgDialect("postgresql://sill:pg_password@localhost:5433/sill") }); +const db = new Kysely({ dialect: createPgDialect("postgresql://sill:pg_password@localhost:5432/sill") }); describe("pgDbApi", () => { let dbApi: DbApiV2; diff --git a/docker-compose.resources.yml b/docker-compose.resources.yml index 0ecb990a..97d0952e 100644 --- a/docker-compose.resources.yml +++ b/docker-compose.resources.yml @@ -6,7 +6,7 @@ services: image: postgres:16 shm_size: 256m ports: - - "5433:5432" + - "5432:5432" environment: POSTGRES_LOG_STATEMENTS: all POSTGRES_DB: sill