Skip to content

Embed images in tutorial page #47

Embed images in tutorial page

Embed images in tutorial page #47

Workflow file for this run

# Run static analysis, tests, and sync
name: "ci"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: True
on:
workflow_dispatch:
pull_request:
push:
branches: ["main"]
defaults:
run:
shell: "pwsh"
env:
UV_CACHE_DIR: ".cache/uv-cache"
UV_SYSTEM_PYTHON: "true"
jobs:
ruff:
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: "ruff check --no-fix --output-format github ."
fawltydeps:
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: "fawltydeps"
pyright:
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: pyright
test:
strategy:
matrix:
runner:
- "macos-14"
- "ubuntu-22.04"
- "windows-2022"
python:
# - "3.10" # ? `scripts` currently requires `tomllib`, which is > 3.10
- "3.11"
- "3.12"
# - "3.13.0-alpha.5" # ? https://github.com/PyO3/pyo3/issues/3555
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1 -Version '${{ matrix.python }}'"
# ! https://github.com/pytest-dev/pytest-cov/issues/479#issuecomment-1247444988
- run: "pytest --cov --cov-config pyproject.toml"
- if: startsWith(matrix.runner, 'ubuntu') && matrix.python == '3.11'
uses: "codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8" # v4.1.1
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
- uses: "actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3" # v4.3.1
with:
path: ".comps"
name: "requirements_${{ matrix.runner }}_${{ matrix.python }}"
sync:
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
permissions:
contents: "write"
needs:
- "ruff"
- "fawltydeps"
- "pyright"
- "test"
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- uses: "actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427" # v4.1.4
with:
path: ".comps"
merge-multiple: True
- run: "scripts/Sync-Py.ps1 -Lock"
- uses: "stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d" # v5.0.0
with:
commit_message: "Sync and lock"