Update django-linear-migrations requirement #576
Workflow file for this run
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: Run linter and tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DEBUG: True | |
RUN_MODE: test | |
SECRET_KEY: changeme! | |
ALLOWED_HOSTS: localhost,127.0.0.1 | |
DATABASE_URL: sqlite:////tmp/db.sqlite3 | |
CORS_ORIGIN_WHITELIST: "http://localhost,http://127.0.0.1" | |
CSRF_TRUSTED_ORIGINS: "http://localhost" | |
REGISTER_VERIFICATION_URL: "http://localhost:4200/verify-user/" | |
RESET_PASSWORD_VERIFICATION_URL: "http://localhost:4200/reset-password/" | |
REGISTER_EMAIL_VERIFICATION_URL: "http://localhost:4200/verify-email/" | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/test.txt | |
- name: Run black | |
run: | | |
pip install black | |
black --check snypy/ | |
- name: Run tests | |
run: pytest --cov=. --cov-report xml | |
working-directory: snypy | |
- name: Generate OpenAPI | |
run: python manage.py spectacular --file schema.yml | |
working-directory: snypy | |
- name: Create artifact | |
if: ${{ matrix.python-version == '3.10' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: schema | |
path: snypy/schema.yml | |
if-no-files-found: error | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.python-version == '3.10' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: snypy | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |