Spaces:
Runtime error
Runtime error
name: Python Application CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
lint-and-format: | |
name: Lint & Format Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run linters and formatters | |
run: pre-commit run --all-files | |
test: | |
name: Run Backend Tests | |
runs-on: ubuntu-latest | |
needs: lint-and-format | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python and install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt -r requirements-dev.txt | |
- name: Run tests with pytest | |
run: pytest |