Added Signup Endpoint #11
Workflow file for this run
This file contains 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: 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 |