Skip to content

Feature/redis session setup #9

Feature/redis session setup

Feature/redis session setup #9

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches:
- main
- dev
jobs:
testing:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: techstart-fashion
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h localhost -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
DATABASE_URL: mysql://root:root@localhost:3306/techstart-fashion
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: cd backend && npm install
- name: Wait for database
run: |
until nc -z localhost 3306; do
echo "Waiting for MySQL to be ready..."
sleep 2
done
echo "MySQL is ready."
- name: Test
run: cd backend && npm run test