Bump astral-sh/setup-uv from 3 to 4 #280
Workflow file for this run
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
name: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
env: | |
DO_NOT_TRACK: 1 | |
UV_SYSTEM_PYTHON: 1 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ contains(matrix.python-version, 'pypy') }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install dependencies | |
run: uv pip install -e '.[dev,docs]' | |
- name: Write karate_club.tsv | |
run: python3 -c 'import networkx as nx; nx.write_weighted_edgelist(nx.karate_club_graph(), "karate_club.tsv", delimiter="\t")' | |
- name: Lint with Mypy | |
run: mypy chinese_whispers | |
- name: Lint with Ruff | |
run: ruff check | |
- name: Test with pytest | |
run: pytest | |
- name: Run Module | |
run: python3 -m chinese_whispers karate_club.tsv | |
- name: Run CLI | |
run: chinese-whispers karate_club.tsv | |
- name: Lint Jupyter with Mypy | |
run: nbqa mypy *.ipynb | |
- name: Run Jupyter | |
run: | | |
mkdir jupyter | |
jupyter nbconvert --to html --output jupyter/index.html --execute example.ipynb | |
- name: Run MkDocs | |
run: mkdocs build --strict | |
- name: Build | |
run: | | |
python3 -m build --sdist --wheel . | |
twine check --strict dist/* | |
- name: Validate CITATION.cff | |
uses: citation-file-format/[email protected] | |
with: | |
args: "--validate" | |
- name: Upload Jupyter | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./jupyter" | |
if: matrix.python-version == '3.13' && github.ref == 'refs/heads/master' | |
pages: | |
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
actions: read | |
id-token: write | |
pages: write | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |