Skip to content

update lxml dependency #630

update lxml dependency

update lxml dependency #630

Workflow file for this run

name: tests
on:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows usage from other workflows
workflow_call:
jobs:
format-and-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Report node version
run: node --version
- name: report python version
run: python --version
- name: Install linters and formatters
run: python -m pip install flake8 black mypy
- name: Install poetry
run: python -m pip install poetry
- name: Initialize project
run: |
python -m poetry install
python -m poetry run python scripts/fetch_core.py
- name: Check formatting with black
run: python -m poetry run black --check --diff $(git ls-files "*.py")
- name: Check for lint
run: python -m poetry run flake8
- name: Check types
run: python -m poetry run mypy --install-types --non-interactive
deep-test:
needs: format-and-types
runs-on: ubuntu-22.04
container: oscarlevin/pretext-full
steps:
- uses: actions/checkout@v4
- name: Report Python version
run: python --version
- name: set up node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install poetry
run: |
pip install --upgrade pip
pip install poetry
- name: View poetry --help
run: poetry --help
- name: Install build dependencies if on Linux
run: |
apt-get update
apt-get -y install gcc pkg-config python3-dev build-essential python3-louis librsvg2-bin libcairo2-dev
- name: Install dependencies
shell: bash
run: |
poetry install --all-extras
poetry run python scripts/fetch_core.py
- name: Ensure dependencies are present
run: |
echo "manually installing pelican; poetry does not seem to do this correctly."
poetry run pip install pelican
poetry run pelican --version
poetry run playwright install chromium
- name: Test with pytest
run: |
poetry run pytest -v --cov
broad-tests:
needs: format-and-types
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: set up node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install poetry
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry
- name: View poetry --help
run: poetry --help
- name: Install build dependencies if on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install python3-louis librsvg2-bin libcairo2-dev
- name: Install dependencies
shell: bash
run: |
python -m poetry install --all-extras
python -m poetry run python scripts/fetch_core.py
- name: Initialize playwright
run: |
echo "Installing playwright dependencies"
python -m poetry run playwright install-deps
echo "Installing playwright browsers"
python -m poetry run playwright install
- name: Ensure dependencies are present
run: |
echo "manually installing pelican; poetry does not seem to do this correctly."
python -m poetry run pip install pelican
python -m poetry run pelican --version
- name: Test with pytest
run: |
python -m poetry run pytest -v --cov
schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: jing trang
version: 1.0
- name: Make sure Schema rnc and rng files in sync via TRANG
run: |
trang ./schema/project-ptx.rnc ./tmp-project-ptx.rng
cmp ./schema/project-ptx.rng ./tmp-project-ptx.rng
- name: Verify template `project.ptx` match schema via JING
run: |
for i in $(find ./templates -name "project.ptx"); do jing ./schema/project-ptx.rng "$i"; done