diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml new file mode 100644 index 0000000..fa305d0 --- /dev/null +++ b/.github/workflows/lint-and-test.yaml @@ -0,0 +1,16 @@ +name: 'Lint and Test' +on: push + +jobs: + lint_and_test: + name: 'Lint and Test' + runs-on: 'ubuntu-latest' + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + cache: 'pip' + - run: 'python3 -m pip install -r requirements.txt' + - run: 'ruff check .' + - run: 'pytest .' diff --git a/app/main.py b/app/main.py index 21c9374..42e3108 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,6 @@ from flask import Blueprint, render_template, request from . import db -from .models import Deck, Game, Player +from .models import Player main = Blueprint("main", __name__) diff --git a/requirements.txt b/requirements.txt index dbccc87..fca8057 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ Flask Flask-SQLAlchemy flasgger flask-login +pytest ruff