From c37eb8f52611a1771a82d459bd4ccc00d89edc6a Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 17:52:53 +0200 Subject: [PATCH 01/10] CI Script: path fixed --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6857ab..bce9604 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,7 +117,7 @@ jobs: - name: Add miktex to PATH run: | - echo "PATH=$PATH;$(pwd)\miktex-portable\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "PATH=$PATH;$(pwd)\miktex-portable\texmfs\install\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Show path variable run: | @@ -140,4 +140,4 @@ jobs: if: strategy.job-index == 0 with: name: rendering-results-windows - path: tests/out/test_*_render*.pdf \ No newline at end of file + path: tests/out/test_*_render*.pdf From 86448a63560640955c813ebea8760e538e3db324 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 18:47:34 +0200 Subject: [PATCH 02/10] CI Script: Cache ID set --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bce9604..66e4559 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,12 +100,13 @@ jobs: - name: Cache MiKTeX Portable uses: actions/cache@v4 + id: miktex with: path: miktex-portable key: miktex-portable-${{ runner.os }}-24.1-x64 - name: Set up MiKTeX Portable - if: steps.cache.outputs.cache-hit != 'true' + if: steps.miktex.outputs.cache-hit != 'true' run: | $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest https://www.nonan.net/w/files/miktex-portable-Win-x64.zip -OutFile miktex-portable-Win-x64.zip From 1ea75c52762f91344caf399c277f261e4166f228 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 20:09:50 +0200 Subject: [PATCH 03/10] ci.yml: robocops added to keep cached files immutable --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66e4559..6869909 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,13 +112,14 @@ jobs: 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 . - - name: Check directory structure of MiKTeX installation + - name: Copy and check directory structure of MiKTeX installation run: | - dir ".\miktex-portable\texmfs\install\miktex\bin\x64\*" + robocopy miktex-portable miktex-run /E + dir ".\miktex-run\texmfs\install\miktex\bin\x64\*" - name: Add miktex to PATH run: | - echo "PATH=$PATH;$(pwd)\miktex-portable\texmfs\install\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "PATH=$PATH;$(pwd)\miktex-run\texmfs\install\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Show path variable run: | From f801568caac01a46dd8e93487305445dbae89ad3 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 20:29:14 +0200 Subject: [PATCH 04/10] Update ci.yml overwrite robocops exit code --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6869909..180e1fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,8 +114,8 @@ jobs: - name: Copy and check directory structure of MiKTeX installation run: | - robocopy miktex-portable miktex-run /E - dir ".\miktex-run\texmfs\install\miktex\bin\x64\*" + robocopy miktex-portable miktex-run /E /NFL + if ($LASTEXITCODE -ge 8) { exit $LASTEXITCODE } - name: Add miktex to PATH run: | From b7198feb9ab043387f6b8c3c64aff678009df0ba Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 20:41:05 +0200 Subject: [PATCH 05/10] Update ci.yml, overwrite exit code 1 with 0 for robocopy --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 180e1fe..084220f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,7 @@ jobs: - name: Copy and check directory structure of MiKTeX installation run: | robocopy miktex-portable miktex-run /E /NFL - if ($LASTEXITCODE -ge 8) { exit $LASTEXITCODE } + if ($LASTEXITCODE -eq 1) { exit 0 } - name: Add miktex to PATH run: | From fc8bef3963d448597b145485edc5598e98a3d72a Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 21:12:28 +0200 Subject: [PATCH 06/10] Update ci.yml: changed path of latex --- .github/workflows/ci.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 084220f..f42c503 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,18 +114,12 @@ jobs: - name: Copy and check directory structure of MiKTeX installation run: | - robocopy miktex-portable miktex-run /E /NFL + robocopy miktex-portable C:\tmp\test_miktex\miktex-portable /E /NFL /NDL if ($LASTEXITCODE -eq 1) { exit 0 } - name: Add miktex to PATH run: | - echo "PATH=$PATH;$(pwd)\miktex-run\texmfs\install\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Show path variable - run: | - echo $env:PATH - echo "-----" - echo $env:GITHUB_ENV + echo "PATH=$PATH;C:\tmp\test_miktex\miktex-portable\texmfs\install\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_ENV -Append - name: test xelatex run: xelatex --version From d65a310e45147d923071a134b1794d0f6f6f41f0 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 22:39:18 +0200 Subject: [PATCH 07/10] Update ci.yml refused test coverage to test caching --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f42c503..22d905d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,7 +129,7 @@ jobs: python -m pip install -e .[dev] - name: Run tests with pytest - run: pytest + run: pytest tests/test_rendering_markdown.py::test_markdown_styling - name: Upload rendered files uses: actions/upload-artifact@v4 From 26d6c67af0a2699c43f1f38613c4c4a59ff1245e Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 23:00:27 +0200 Subject: [PATCH 08/10] Update ci.yml cache syntax updated --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22d905d..ca50f7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,8 +105,8 @@ jobs: path: miktex-portable key: miktex-portable-${{ runner.os }}-24.1-x64 - - name: Set up MiKTeX Portable - if: steps.miktex.outputs.cache-hit != 'true' + - if: ${{ steps.miktex.outputs.cache-hit != 'true' }} + name: Set up MiKTeX Portable run: | $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest https://www.nonan.net/w/files/miktex-portable-Win-x64.zip -OutFile miktex-portable-Win-x64.zip From ccf7df8cc2054e24ef051f71a133264653bda9f6 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 9 Jun 2025 23:43:40 +0200 Subject: [PATCH 09/10] Update ci.yml adden got tools to path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca50f7d..99e1769 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,7 +119,7 @@ jobs: - name: Add miktex to PATH run: | - echo "PATH=$PATH;C:\tmp\test_miktex\miktex-portable\texmfs\install\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: test xelatex run: xelatex --version From 29eb3a6a70d7ee449b0e981ab88a31474dd876e8 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Tue, 10 Jun 2025 00:06:34 +0200 Subject: [PATCH 10/10] Update ci.yml shorted for testing --- .github/workflows/ci.yml | 75 ---------------------------------------- 1 file changed, 75 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99e1769..d069796 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,81 +7,6 @@ on: branches: [main] 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: runs-on: windows-latest