-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (35 loc) · 906 Bytes
/
python-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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: root
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