diff --git a/.github/workflows/dev.ci.yml b/.github/workflows/dev.ci.yml index 2181a3d..94095a8 100644 --- a/.github/workflows/dev.ci.yml +++ b/.github/workflows/dev.ci.yml @@ -11,6 +11,23 @@ on: jobs: build: runs-on: ubuntu-latest + + services: + mysql: + image: mysql:latest + env: + MYSQL_ROOT_PASSWORD: password + MYSQL_DATABASE: test + MYSQL_USER: root + MYSQL_PASSWORD: password + ports: + - 3306:3306 + options: >- + --health-cmd="mysqladmin ping" + --health-interval=10s + --health-timeout=5s + --health-retries=3 + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -32,11 +49,18 @@ jobs: - name: DevServer Backend CI if: steps.changes.outputs.backend == 'true' + env: + DATABASE_HOST: 127.0.0.1 + DATABASE_PORT: 3306 + DATABASE_USER: root + DATABASE_PASSWORD: password + DATABASE_NAME: test run: | cd ./backend npm install npm run build NODE_ENV=CI npm run test + NODE_ENV=CI npm run test:e2e cd .. - name: DevServer Frontend CI