feat: Use flask run
instead of python main.py
(#169)
#115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push,pull_request] | |
jobs: | |
check-formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install and run pre-commit hooks | |
run: | | |
pip install pre-commit | |
pre-commit run --all-files | |
run-tests: | |
runs-on: ubuntu-latest | |
needs: check-formatting | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Setup environment | |
run: | | |
cp samples/.env.dev .env | |
mkdir data | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run tests | |
run: python -m unittest -v |