Skip to content

Commit

Permalink
Use GitHub Actions #451 test
Browse files Browse the repository at this point in the history
  • Loading branch information
sinproject-iwasaki committed Mar 30, 2023
1 parent 9f7377b commit 635ed63
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,55 @@ jobs:

timeout-minutes: 1

env:
DATABASE_URL: mysql://root:root@127.0.0.1:3306/test

services:
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: root
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: Install dependencies
run: npm ci

- name: Prisma generate
run: npx prisma generate

- name: Prisma migrate
run: npx prisma migrate deploy

- name: Seeder generate
run: npx prisma db seed

- name: Test
run: npm run test:ci

test_e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest

timeout-minutes: 1

env:
DATABASE_URL: mysql://root:root@127.0.0.1:3306/test

Expand Down Expand Up @@ -105,4 +154,4 @@ jobs:
run: npx prisma db seed

- name: Test
run: npm run test:ci
run: npm run test:e2e

0 comments on commit 635ed63

Please sign in to comment.