diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c41c069..cb2c0ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,14 @@ jobs: run: | fluentci run --wasm bun run lint working-directory: src/client + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Server Lint run: | fluentci run --wasm bun run lint working-directory: src/server + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿงช Client Unit Tests run: | fluentci run --wasm bun run test @@ -25,6 +29,7 @@ jobs: env: CI: true NODE_ENV: test + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿงช Server Unit Tests run: | fluentci run --wasm bun run test @@ -32,12 +37,18 @@ jobs: env: CI: true NODE_ENV: test + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿ”„ E2E Tests run: | cd src/client && fluentci run --wasm cypress install cd ../.. fluentci run --wasm . e2e + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿ”„ E2E Server run: | fluentci run --wasm postgres start + pkgx psql --host=localhost -d postgres -U `whoami` -c 'CREATE DATABASE test;' fluentci run --wasm . server_e2e + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/server/ormconfig.ci.json b/src/server/ormconfig.ci.json index 1ac3113..da8ddb4 100644 --- a/src/server/ormconfig.ci.json +++ b/src/server/ormconfig.ci.json @@ -1,23 +1,23 @@ { - "type": "postgres", - "host": "localhost", - "port": 5432, - "username": "postgres", - "password": "", - "database": "postgres", - "synchronize": false, - "migrationsRun": true, - "logging": false, - "entities": [ - "src/entity/**/*.ts" - ], - "migrations": [ - "src/migration/**/*.ts" - ], - "subscribers": [ - "src/subscriber/**/*.ts" - ], - "cli": { - "migrationsDir": "src/migration" - } -} + "type": "postgres", + "host": "localhost", + "port": 5432, + "username": "runner", + "password": "", + "database": "test", + "synchronize": false, + "migrationsRun": true, + "logging": false, + "entities": [ + "src/entity/**/*.ts" + ], + "migrations": [ + "src/migration/**/*.ts" + ], + "subscribers": [ + "src/subscriber/**/*.ts" + ], + "cli": { + "migrationsDir": "src/migration" + } +} \ No newline at end of file diff --git a/src/server/test.env b/src/server/test.env index 60340bf..29fbbfe 100644 --- a/src/server/test.env +++ b/src/server/test.env @@ -2,7 +2,7 @@ NODE_ENV=test PORT=3001 URL_PREFIX=v1/api DATABASE_HOST=localhost -DATABASE_USER=postgres +DATABASE_USER=runner DATABASE_PASSWORD= -DATABASE_DBNAME=postgres +DATABASE_DBNAME=test DATABASE_PORT=5432