Skip to content

Include manifest & test lock #158

Include manifest & test lock

Include manifest & test lock #158

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
env:
UV_FROZEN: '1'
jobs:
test:
name: Py ${{ matrix.python }} / Django ${{ matrix.django }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
django: ['4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install Dependencies
run: |
uv sync --all-extras
uv pip install --upgrade Django~=${{ matrix.django }}
- name: Test build
run: |
uv build --sdist
- name: Test lock
run: UV_FROZEN="" uv lock --check
- name: Run Tests
run: |
uv run spirit startproject test_project
uv run -- ./test_project/manage.py makemigrations --check
export PYTHONWARNINGS="default"
uv run runtests.py
test_js:
name: JS
runs-on: ubuntu-latest
strategy:
matrix:
node: [22.x]
steps:
- uses: actions/checkout@v2
- name: Set Up NodeJS ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: |
npm install -g yarn
npm install -g jasmine@3.6.1
yarn
- name: Run Tests
run: |
make testjs
test_no_deps:
name: No-deps / Py ${{ matrix.python }} / Django ${{ matrix.django }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
django: ['4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install Dependencies
run: |
uv sync
uv pip install --upgrade Django~=${{ matrix.django }}
- name: Run Tests
run: |
uv run spirit startproject test_project
export PYTHONWARNINGS="default"
export ST_UPLOAD_FILE_ENABLED=0
export ST_INSTALL_HUEY=0
uv run runtests.py
test_huey:
name: Huey / Py ${{ matrix.python }} / Django ${{ matrix.django }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
django: ['4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install Dependencies
run: |
uv sync --all-extras
uv pip install --upgrade Django~=${{ matrix.django }}
- name: Run Tests
run: |
uv run spirit startproject test_project
export PYTHONWARNINGS="default"
export ST_UPLOAD_FILE_ENABLED=0
export ST_TASK_MANAGER="huey"
uv run runtests.py
test_celery:
name: Celery / Py ${{ matrix.python }} / Django ${{ matrix.django }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.9']
django: ['4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install Dependencies
run: |
uv sync --all-extras
uv pip install --upgrade Django~=${{ matrix.django }}
- name: Run Tests
run: |
uv run spirit startproject test_project
export PYTHONWARNINGS="default"
export ST_UPLOAD_FILE_ENABLED=0
export ST_TASK_MANAGER="celery"
uv run runtests.py
lint_format:
name: Lint & Format / Py ${{ matrix.python }} / Django ${{ matrix.django }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.12']
django: ['4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Run Linter
run: |
uvx ruff check --select I
- name: Run Formatter
run: |
uvx ruff format --check
coverage:
name: Coverage / Py ${{ matrix.python }} / Django ${{ matrix.django }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.12']
django: ['4.2']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
- name: Install Dependencies
run: |
uv sync --all-extras
uv pip install --upgrade Django~=${{ matrix.django }}
uv pip install --upgrade coveralls
- name: Run Tests
run: |
uv run spirit startproject test_project
export PYTHONWARNINGS="default"
uv run -- coverage run --source=. runtests.py
- name: Submit to coveralls
env:
COVERALLS_FLAG_NAME: run-${{ matrix.python }}-${{ matrix.django }}
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run -- coveralls --service=github
uv run -- coveralls --finish