Skip to content

Commit

Permalink
fix ci file 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshith Umesh authored and Harshith Umesh committed Feb 15, 2024
1 parent 952010c commit 0f82b62
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/ci_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ on:
jobs:
integration-test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: Users
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping -h localhost" --health-interval=10s --health-timeout=5s --health-retries=5

env:
DB_DATABASE: Users
DB_USER: root
DB_PASSWORD: root

steps:
- name: Checkout Repository
Expand All @@ -27,6 +23,11 @@ jobs:
with:
python-version: 3.8

- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,11 +38,6 @@ jobs:
run: |
echo "SQLALCHEMY_DATABASE_URI=mysql+pymysql://root:password@mysql/Users" > .env
- name: Check MySQL Service Availability
run: |
ping -c 4 mysql
- name: Check MySQL Connection
run: |
mysql -h mysql -u root -ppassword -e "SHOW DATABASES;"
Expand Down

0 comments on commit 0f82b62

Please sign in to comment.