Created
May 9, 2025 15:09
-
-
Save UltiRequiem/9839019eaee106e77489892c471b3b62 to your computer and use it in GitHub Desktop.
E2E tests with db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Tests | |
on: | |
push: | |
branches: [adabat] | |
pull_request: | |
branches: [adabat] | |
jobs: | |
e2e-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker | |
uses: docker/setup-docker-action@v4 | |
with: | |
daemon-config: | | |
{ | |
"debug": true, | |
"features": { | |
"containerd-snapshotter": true | |
} | |
} | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Start Database with Docker Compose | |
run: | | |
docker compose up -d | |
sleep 15 | |
env: | |
DB_ROOT_PASSWORD: root | |
- name: Install dependencies | |
run: bun install | |
- name: Generate Prisma Client | |
run: bun run prisma:generate | |
- name: Create test database and run migrations | |
run: | | |
bun run prisma:db-push | |
env: | |
DATABASE_URL: mysql://root:root@localhost:3306/adabat_bank | |
- name: Seed the database | |
run: bun run prisma:seed | |
env: | |
DATABASE_URL: mysql://root:root@localhost:3306/adabat_bank | |
- name: Run E2E tests | |
run: bun test:e2e | |
env: | |
DATABASE_URL: mysql://root:root@localhost:3306/adabat_bank | |
- name: Run tests | |
run: bun test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment