Patch #2
This file contains hidden or 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: Lint and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install flake8 black mypy isort pytest | |
| - name: Run Black (Check) | |
| run: black . --check | |
| - name: Run Isort (Check) | |
| run: isort . --check-only | |
| - name: Run Flake8 | |
| run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Uncomment when tests are added | |
| # - name: Run Pytest | |
| # run: pytest |