Update all dependencies #239
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
# 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: "../uv-cache" | |
UV_SYSTEM_PYTHON: "true" | |
jobs: | |
sync: | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1" | |
- uses: "actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882" # v4.4.3 | |
with: | |
name: "lock" | |
path: "lock.json" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
build-docs: | |
needs: "sync" | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" # v4.1.8 | |
with: | |
name: "lock" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1" | |
- run: "sphinx-build -EaT docs _site" | |
- uses: "actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa" # v3.0.1 | |
deploy-docs: | |
if: github.event_name != 'pull_request' | |
needs: "build-docs" | |
permissions: | |
pages: "write" | |
id-token: "write" | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
environment: | |
name: "github-pages" | |
url: "${{ steps.deployment.outputs.page_url }}" | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- id: "deployment" | |
uses: "actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e" # v4.0.5 | |
ruff: | |
needs: "sync" | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" # v4.1.8 | |
with: | |
name: "lock" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1" | |
- run: "ruff check --no-fix --output-format github ." | |
fawltydeps: | |
needs: "sync" | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" # v4.1.8 | |
with: | |
name: "lock" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1" | |
- run: "fawltydeps" | |
pyright: | |
needs: "sync" | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" # v4.1.8 | |
with: | |
name: "lock" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1" | |
- uses: "jakebailey/pyright-action@b5d50e5cde6547546a5c4ac92e416a8c2c1a1dfe" # v2.3.2 | |
with: | |
pylance-version: "${{ env.PYRIGHT_PYTHON_PYLANCE_VERSION }}" | |
test: | |
needs: "sync" | |
strategy: | |
matrix: | |
runner: | |
- "macos-13" | |
- "ubuntu-22.04" | |
- "windows-2022" | |
python: | |
- "3.11" | |
- "3.12" | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" # v4.1.8 | |
with: | |
name: "lock" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1 -Version '${{ matrix.python }}'" | |
- run: "pytest" | |
- if: startsWith(matrix.runner, 'ubuntu') && matrix.python == '3.11' | |
uses: "codecov/codecov-action@968872560f81e7bdde9272853e65f2507c0eca7c" # v5.0.0 | |
env: | |
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | |
lock: | |
needs: | |
- "ruff" | |
- "fawltydeps" | |
- "pyright" | |
- "test" | |
permissions: | |
contents: "write" | |
strategy: | |
matrix: | |
runner: ["ubuntu-22.04"] | |
python: ["3.11"] | |
runs-on: "${{ matrix.runner }}" | |
steps: | |
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 | |
with: | |
submodules: True | |
- uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16" # v4.1.8 | |
with: | |
name: "lock" | |
- uses: "actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a" # v4.1.2 | |
with: | |
path: "${{ env.UV_CACHE_DIR }}" | |
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}" | |
- uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b" # v5.3.0 | |
with: | |
python-version: "${{ matrix.python }}" | |
- run: "scripts/Sync-Py.ps1" | |
- uses: "stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842" # v5.0.1 | |
with: | |
commit_message: "Sync and lock" |