Skip to content

Commit

Permalink
Update python-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
montymi committed Mar 7, 2024
1 parent 58e134a commit 78afd1e
Show file tree
Hide file tree
Showing 42 changed files with 581 additions and 347 deletions.
59 changes: 30 additions & 29 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application
name: Python Test with MySQL

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches: [ "main" ]

permissions:
contents: read
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_DATABASE: testgrocer
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python test_main.py
- 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 main test script
run: |
cd src && python test_main.py
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# pycache
*/__pycache__
__pycache__

# virtual environment
env/
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]

<!-- PROJECT LOGO -->
<br />
Expand Down
Binary file removed docs/proposal/LazyGrocerActivityDiagram.png
Binary file not shown.
Binary file removed docs/proposal/LazyGrozerClassDiagram.png
Binary file not shown.
Binary file removed docs/proposal/LazyGrozerERDdiagram.png
Binary file not shown.
Binary file removed docs/proposal/proposalLazyGrocer.pdf
Binary file not shown.
10 changes: 0 additions & 10 deletions docs/stack.txt

This file was deleted.

23 changes: 0 additions & 23 deletions lazyGrocer.py

This file was deleted.

Binary file removed recipe.db
Binary file not shown.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mysql-connector-python
81 changes: 0 additions & 81 deletions services/add_recipe.py

This file was deleted.

56 changes: 0 additions & 56 deletions services/import_recipe.py

This file was deleted.

104 changes: 0 additions & 104 deletions services/pick_recipe.py

This file was deleted.

Loading

0 comments on commit 78afd1e

Please sign in to comment.