Skip to content

Upgrade Jinja2 to fix vulnerability #2053

Upgrade Jinja2 to fix vulnerability

Upgrade Jinja2 to fix vulnerability #2053

Workflow file for this run

---
name: CI
on:
- push
- pull_request
jobs:
poetry-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
run: pipx install poetry
- name: Validate pyproject.toml and poetry.lock
run: poetry check
python-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Setup environment
run: |
pipx install poetry
poetry config virtualenvs.prefer-active-python true
- name: Install dependencies
run: poetry install --no-root --only dev
- name: Run Ruff formatter
run: poetry run ruff format --check --diff
tests:
runs-on: ubuntu-latest
needs:
- poetry-check
- python-lint
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
services:
postgres:
image: postgres:12
ports:
- 5432:5432
env:
POSTGRES_DB: peering_manager
POSTGRES_USER: devbox
POSTGRES_PASSWORD: devbox
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:6
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup environment
run: |
pipx install poetry
poetry config virtualenvs.prefer-active-python true
cp peering_manager/configuration.example.py peering_manager/configuration.py
- name: Install dependencies
run: poetry install --no-root --with dev,docs
- name: Build documentation
run: poetry run mkdocs build
- name: Collect static files
run: poetry run python manage.py collectstatic --no-input
- name: Check for missing migrations
run: poetry run python manage.py makemigrations --check
- name: Run tests
run: poetry run coverage run manage.py test
- name: Generate coverage report
run: poetry run coverage xml -i
- name: Report coverage
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
github-token: ${{ secrets.GITHUB_TOKEN}}