feat: implement flight model and crud endpoints #18
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test: | |
| name: Run tests | |
| 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.12' | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements/development.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: pip install -r requirements/development.txt | |
| - name: Create .env file | |
| run: | | |
| echo "SECRET_KEY=test-secret-key-for-ci-only" > .env | |
| echo "DEBUG=True" >> .env | |
| - name: Run flake8 | |
| run: python3 -m flake8 . --max-line-length=120 | |
| - name: Run bandit | |
| run: python3 -m bandit -r . --exclude .venv,migrations -ll | |
| - name: Run tests | |
| run: python3 -m pytest || exit_code=$?; if [ "$exit_code" = "5" ]; then exit 0; else exit $exit_code; fi |