Fixed Workflow and Added Tests (#3) #4
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: Code Style | |
on: | |
push: | |
branches: [main, master] | |
paths-ignore: | |
- "exhibitors/locale/**" | |
- "exhibitors/static/**" | |
pull_request: | |
branches: [main, master] | |
paths-ignore: | |
- "exhibitors/locale/**" | |
- "exhibitors/static/**" | |
jobs: | |
isort: | |
name: isort | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" psycopg2-binary | |
pip install isort | |
- name: Run isort | |
run: isort --check-only . | |
flake: | |
name: flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" psycopg2-binary | |
pip install flake8 | |
- name: Run flake8 | |
run: flake8 . |