Skip to content

Update python-app.yml #10

Update python-app.yml

Update python-app.yml #10

Workflow file for this run

name: Python Test with MySQL
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_DATABASE: testgrocer
MYSQL_USER: lg
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11.2'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run tests
run: |
python src/test_main.py