Skip to content

Commit

Permalink
Sync with template
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Apr 24, 2024
1 parent 1e2b5fd commit 3de3c8d
Show file tree
Hide file tree
Showing 25 changed files with 540 additions and 350 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 37a16cc
_commit: 903d929
_src_path: gh:blakeNaccarato/copier-python
actions_runner: ubuntu-22.04
active: false
Expand Down
142 changes: 108 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,64 +15,140 @@ env:
UV_CACHE_DIR: ".cache/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@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- uses: "actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808" # v4.3.3
with:
name: "lock"
path: "lock.json"
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.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@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "lock"
- 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: "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@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "lock"
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
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:
needs: "sync"
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "lock"
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
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:
needs: "sync"
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "lock"
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
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:
needs: "sync"
strategy:
matrix:
runner:
Expand All @@ -82,60 +158,58 @@ jobs:
python:
# - "3.10" # ? `scripts` currently requires `tomllib`, which is > 3.10
- "3.11"
- "3.12"
# - "3.12" # ? No support in my commit-pinned fork of cachier
# - "3.13.0-alpha.5" # ? https://github.com/PyO3/pyo3/issues/3555
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "lock"
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
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
uses: "codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed" # v4.3.0
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"
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@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "lock"
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
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
- run: "scripts/Sync-Py.ps1"
- uses: "stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842" # v5.0.1
with:
commit_message: "Sync and lock"
18 changes: 9 additions & 9 deletions .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,38 @@ jobs:
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
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 -Lock -Version '3.11'"
- run: "scripts/Sync-Py.ps1 -Version '3.11'"
spaces-in-path:
strategy:
matrix:
runner:
- "macos-13"
- "macos-14"
- "ubuntu-22.04"
- "windows-2022"
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- run: "New-Item -ItemType Directory 'repo path with spaces'"
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
- uses: "actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f" # v4.1.3
with:
submodules: True
path: "repo path with spaces"
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python}}-${{ hashFiles('lock.json') }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- working-directory: "repo path with spaces"
run: "scripts/Sync-Py.ps1 -Lock -Version '3.11'"
run: "scripts/Sync-Py.ps1 -Version '3.11'"
55 changes: 0 additions & 55 deletions .github/workflows/docs.yml

This file was deleted.

Loading

0 comments on commit 3de3c8d

Please sign in to comment.