Skip to content

Commit

Permalink
fix: only run unit tests on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfran committed Apr 9, 2024
1 parent f796872 commit d2d2e99
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:

- name: Test
id: npm-test
run: npm run test
run: npm run unit:tests
1 change: 1 addition & 0 deletions apps/api/src/app/init-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fastify.register(async function (fastify) {
});

fastify.get('/sub', { websocket: true }, async (connection, req) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const cookies = (req as any).cookies;
const sessionId = cookies[lucia.sessionCookieName];

Expand Down
1 change: 0 additions & 1 deletion apps/api/src/tests/ws-leave.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe('ws', () => {

beforeAll(async () => {
await startDB();
console.log('fin start db');
await createMultipleUsers();
wsServer = await initTestServer(port);
ws = await initWs(port);
Expand Down

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions libs/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ This library was generated with [Nx](https://nx.dev).
## Building

Run `nx build utils` to build the library.

## Running unit tests

Run `nx test utils` to execute the unit tests via [Vitest](https://vitest.dev/).
3 changes: 0 additions & 3 deletions libs/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@
{
"path": "./tsconfig.lib.json",
},
{
"path": "./tsconfig.spec.json",
},
],
}
4 changes: 2 additions & 2 deletions libs/utils/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node", "vite/client"]
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["vite.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"]
}
19 changes: 0 additions & 19 deletions libs/utils/tsconfig.spec.json

This file was deleted.

62 changes: 0 additions & 62 deletions libs/utils/vite.config.ts

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"start:api": "nx serve api",
"build": "npm run config && nx build",
"migrate": "nx run api:migrate",
"test": "nx test",
"test": "nx run-many --target=test --exclude='api'",
"e2e:tests": "nx run test api",
"start:docker": "cd docker && docker compose --env-file=../.env up -d",
"stop:docker": "cd docker && docker compose --env-file=../.env down",
"start:docker:clean": "cd docker && docker compose --env-file=../.env up -d --force-recreate --build",
Expand Down

0 comments on commit d2d2e99

Please sign in to comment.