mirror of https://github.com/Nonannet/pyladoc.git
Merge 29eb3a6a70
into c72a1e70c4
This commit is contained in:
commit
92bee0987a
|
@ -7,81 +7,6 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-ubuntu-no-optional-dependencies:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.10", 3.13]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
|
|
||||||
- name: Install from source and install pytest
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install -e .
|
|
||||||
python -m pip install pytest lxml requests
|
|
||||||
|
|
||||||
- name: Run tests with pytest (no matplotlib, no pandas)
|
|
||||||
run: |
|
|
||||||
pytest tests/test_rendering_markdown.py::test_markdown_styling
|
|
||||||
pytest tests/test_rendering_markdown.py::test_markdown_table
|
|
||||||
|
|
||||||
- name: Install matplotlib
|
|
||||||
run: |
|
|
||||||
python -m pip install matplotlib
|
|
||||||
|
|
||||||
- name: Run tests with pytest rendering equations (with matplotlib)
|
|
||||||
run: |
|
|
||||||
pytest tests/test_rendering_markdown.py::test_markdown_equations
|
|
||||||
|
|
||||||
build-ubuntu:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.10"]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
|
|
||||||
- name: Install LaTeX
|
|
||||||
run: sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended lmodern texlive-xetex texlive-science
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install -e .[dev]
|
|
||||||
|
|
||||||
- name: Lint code with flake8
|
|
||||||
run: flake8
|
|
||||||
|
|
||||||
- name: Type checking with mypy
|
|
||||||
run: mypy
|
|
||||||
|
|
||||||
- name: Run tests with pytest
|
|
||||||
run: pytest
|
|
||||||
|
|
||||||
- name: Upload rendered files
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
if: strategy.job-index == 0
|
|
||||||
with:
|
|
||||||
name: rendering-results-ubuntu
|
|
||||||
path: tests/out/test_*_render*
|
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
@ -100,30 +25,26 @@ jobs:
|
||||||
|
|
||||||
- name: Cache MiKTeX Portable
|
- name: Cache MiKTeX Portable
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
id: miktex
|
||||||
with:
|
with:
|
||||||
path: miktex-portable
|
path: miktex-portable
|
||||||
key: miktex-portable-${{ runner.os }}-24.1-x64
|
key: miktex-portable-${{ runner.os }}-24.1-x64
|
||||||
|
|
||||||
- name: Set up MiKTeX Portable
|
- if: ${{ steps.miktex.outputs.cache-hit != 'true' }}
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
name: Set up MiKTeX Portable
|
||||||
run: |
|
run: |
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
Invoke-WebRequest https://www.nonan.net/w/files/miktex-portable-Win-x64.zip -OutFile miktex-portable-Win-x64.zip
|
Invoke-WebRequest https://www.nonan.net/w/files/miktex-portable-Win-x64.zip -OutFile miktex-portable-Win-x64.zip
|
||||||
Expand-Archive miktex-portable-Win-x64.zip -DestinationPath .
|
Expand-Archive miktex-portable-Win-x64.zip -DestinationPath .
|
||||||
|
|
||||||
- name: Check directory structure of MiKTeX installation
|
- name: Copy and check directory structure of MiKTeX installation
|
||||||
run: |
|
run: |
|
||||||
dir ".\miktex-portable\texmfs\install\miktex\bin\x64\*"
|
robocopy miktex-portable C:\tmp\test_miktex\miktex-portable /E /NFL /NDL
|
||||||
|
if ($LASTEXITCODE -eq 1) { exit 0 }
|
||||||
|
|
||||||
- name: Add miktex to PATH
|
- name: Add miktex to PATH
|
||||||
run: |
|
run: |
|
||||||
echo "PATH=$PATH;$(pwd)\miktex-portable\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append
|
echo "PATH=$PATH;C:\tmp\test_miktex\miktex-portable\texmfs\install\miktex\bin\x64;C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||||
|
|
||||||
- name: Show path variable
|
|
||||||
run: |
|
|
||||||
echo $env:PATH
|
|
||||||
echo "-----"
|
|
||||||
echo $env:GITHUB_ENV
|
|
||||||
|
|
||||||
- name: test xelatex
|
- name: test xelatex
|
||||||
run: xelatex --version
|
run: xelatex --version
|
||||||
|
@ -133,7 +54,7 @@ jobs:
|
||||||
python -m pip install -e .[dev]
|
python -m pip install -e .[dev]
|
||||||
|
|
||||||
- name: Run tests with pytest
|
- name: Run tests with pytest
|
||||||
run: pytest
|
run: pytest tests/test_rendering_markdown.py::test_markdown_styling
|
||||||
|
|
||||||
- name: Upload rendered files
|
- name: Upload rendered files
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
Loading…
Reference in New Issue