Merge pull request #2 from blakeNaccarato/renovate/all #5
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_SYSTEM_PYTHON: "true" | |
jobs: | |
ruff: | |
runs-on: "ubuntu-22.04" | |
steps: | |
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 | |
with: | |
submodules: True | |
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 | |
with: | |
python-version: "3.11" | |
- run: "scripts/Sync-Py.ps1" | |
- run: "ruff check --no-fix --output-format github ." | |
fawltydeps: | |
runs-on: "ubuntu-22.04" | |
steps: | |
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 | |
with: | |
submodules: True | |
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 | |
with: | |
python-version: "3.11" | |
- run: "scripts/Sync-Py.ps1" | |
- run: "fawltydeps" | |
pyright: | |
runs-on: "ubuntu-22.04" | |
steps: | |
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 | |
with: | |
submodules: True | |
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 | |
with: | |
python-version: "3.11" | |
- run: "scripts/Sync-Py.ps1" | |
- run: pyright | |
test: | |
strategy: | |
matrix: | |
runner: | |
- "macos-13" | |
- "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/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: | |
permissions: | |
contents: "write" | |
needs: | |
- "ruff" | |
- "fawltydeps" | |
- "pyright" | |
- "test" | |
runs-on: "ubuntu-22.04" | |
steps: | |
- uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 | |
with: | |
submodules: True | |
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 | |
with: | |
python-version: "3.11" | |
- 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" |