[GH Actions]: Bump xu-cheng/latex-action from 2 to 3 #281
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: MIT | |
name: CI Default Branch | |
on: | |
push: | |
branches: [development] | |
pull_request: | |
branches: [development] | |
jobs: | |
linting-building: | |
name: Run Linters and Build Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/tox.txt | |
- name: Run black | |
run: make util/black | |
# - name: Run mypy | |
# run: make util/mypy | |
- name: Run flake8 | |
run: make util/flake8 | |
- name: Run bandit | |
run: make util/bandit | |
- name: Run doc8 | |
run: make util/doc8 | |
- name: Build Python Package | |
run: make util/flit/build | |
- name: Upload *.whl | |
uses: actions/upload-artifact@v3 | |
with: | |
name: temporary_package | |
path: dist/*.whl | |
if-no-files-found: error | |
retention-days: 1 | |
testing: | |
name: Tests (${{ matrix.os }}, ${{ matrix.python-version }}) | |
needs: linting-building | |
strategy: | |
matrix: | |
# "macos-latest" not included, because hosting on macos is not that common | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup OS ${{ matrix.os }} - Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/ci-full.txt | |
- name: Run tests with tox | |
run: tox | |
env: | |
PLATFORM: ${{ matrix.os }} | |
- name: Prepare coverage result | |
run: | | |
coverage combine --append | |
coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: OS_${{ matrix.os }}-Python_${{ matrix.python-version }} | |
COVERALLS_PARALLEL: true | |
- name: Download *.whl | |
uses: actions/download-artifact@v3 | |
with: | |
name: temporary_package | |
path: dist/ | |
- name: Verify Package Installation | |
run: make ci/test/installation | |
layout-compilation: | |
name: Verify that TexLayouts are compilable | |
needs: linting-building | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements/ci-full.txt | |
# This runs the complete test suite again, so linux/python 3.9 is included | |
# two times. Deal with it! | |
- name: Create TeX Files | |
run: make ci/test/texlayoutcompilation | |
- name: Compile TeX Files | |
uses: xu-cheng/latex-action@v3 | |
with: | |
working_directory: tmp_compilation | |
root_file: "*.tex" | |
glob_root_file: true | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: compiled_layouts | |
path: tmp_compilation/ | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Prepare coverage result | |
run: | | |
coverage combine --append | |
coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: layout-compilation | |
COVERALLS_PARALLEL: true | |
documentation: | |
name: Documentation | |
needs: linting-building | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install graphviz | |
python -m pip install --upgrade pip | |
pip install -r requirements/tox.txt | |
- name: Run Sphinx's linkcheck | |
run: make sphinx/linkcheck | |
- name: Build HTML Documentation | |
run: make sphinx/build/html | |
dependabot: | |
needs: [testing, layout-compilation, documentation] | |
uses: mischback/development-meta/.github/workflows/dependabot-auto-approve.yml@development | |
with: | |
pr_url: ${{ github.event.pull_request.html_url }} | |
secrets: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
finish: | |
name: Indicate completion to Coveralls.io | |
needs: [testing, layout-compilation] | |
runs-on: ubuntu-latest | |
steps: | |
# This step is run without checkout of the source code, because the step | |
# just performs the notification of coveralls. | |
# This means, that the requirements files (in particular | |
# ``requirements/ci-full.txt``) is not available. | |
- name: Finished coverage collection | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade coveralls | |
coveralls --service=github --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |