-
Notifications
You must be signed in to change notification settings - Fork 61
61 lines (47 loc) · 1.72 KB
/
Copy pathpythonpackage.yml
File metadata and controls
61 lines (47 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Installs dependencies, lints, builds the docs and runs the tests on every supported Python version.
# For more information see: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
enable-cache: true
# The ruff version comes from the dev extra in pyproject.toml.
- name: Lint with ruff
run: uv run --frozen --extra dev ruff check graphtage test docs bindist
- name: Check that uv.lock matches pyproject.toml
run: uv lock --check
build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Test building documentation
run: uv run --frozen --extra dev make -C docs html SPHINXOPTS="-W --keep-going"
- name: Test with pytest
run: uv run --frozen --extra dev pytest