-
Notifications
You must be signed in to change notification settings - Fork 20
42 lines (36 loc) · 1.11 KB
/
evaluate_assignment.yml
File metadata and controls
42 lines (36 loc) · 1.11 KB
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: Evaluate Assignment
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: SchoolDB
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 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mysql-connector-python
- name: Populate Database
run: |
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uroot -ppassword SchoolDB < ./schema.sql
- name: Evaluate Assignment
run: python main.py
env:
MYSQL_HOST: 127.0.0.1
MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_DB: SchoolDB