Add GHA with Ruff and Pytest

This commit is contained in:
Jack Jackson 2024-01-23 23:06:33 -08:00
parent 9758991ca5
commit af0ab022ce
3 changed files with 18 additions and 1 deletions

16
.github/workflows/lint-and-test.yaml vendored Normal file
View File

@ -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 .'

View File

@ -1,6 +1,6 @@
from flask import Blueprint, render_template, request from flask import Blueprint, render_template, request
from . import db from . import db
from .models import Deck, Game, Player from .models import Player
main = Blueprint("main", __name__) main = Blueprint("main", __name__)

View File

@ -2,4 +2,5 @@ Flask
Flask-SQLAlchemy Flask-SQLAlchemy
flasgger flasgger
flask-login flask-login
pytest
ruff ruff