Skip to content

Commit

Permalink
chore: try to fix gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
kujo205 committed Dec 18, 2024
1 parent 21ae3dc commit 4d67b10
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run pretest script
run: npm run test:i
- name: Run integration tests
run: npm run test:i
- name: 'Report Coverage'
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "workflows",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/kujo205/yt-music-sharer.git"
},
"private": true
}
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ services:
environment:
MYSQL_ROOT_PASSWORD: 123
MYSQL_DATABASE: test
healthcheck:
test: mysql --user=root --password=123 --execute='show databases'
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
start_interval: 5s
volumes:
- .docker/setup.sql:/docker-entrypoint-initdb.d/init.sql
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"codegen": "prisma db pull --schema=src/server/db/types/schema.prisma && prisma-case-format --file src/server/db/types/schema.prisma && prisma generate --schema=src/server/db/types/schema.prisma && prettier --write src/server/db/types/db-types.d.ts src/server/db/types/enums.ts",
"test": "npm run test:unit && npm run test:i && npm run test:e2e",
"test:unit": "vitest --coverage --config ./tests/conf/vite.unit.config.ts",
"pretest:i": "dotenv -e .env.test npm run db:up && dotenv -e .env.test npm run db:migrate && dotenv -e .env.test npm run db:seed",
"pretest:i": "dotenv -e .env.test npm run db:up && sleep 20 && dotenv -e .env.test npm run db:migrate && dotenv -e .env.test npm run db:seed",
"test:i": "vitest --coverage --config ./tests/conf/vite.integration.config.ts",
"posttest:i": "dotenv -e .env.test npm run db:down",
"test:e2e": "playwright test",
Expand Down
6 changes: 6 additions & 0 deletions tests/conf/vite.integration.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export default defineConfig(() => ({
threads: {
singleThread: true
}
},

coverage: {
reporter: ['text', 'json', 'html', 'json-summary'],
exclude: ['node_modules', 'tests', 'build/**', '.svelte-kit/**'],
reportOnFailure: true
}
}
}));

0 comments on commit 4d67b10

Please sign in to comment.