Skip to content

Commit e7bbc1c

Browse files
Migrate Pytest workflow to uv
1 parent 580fead commit e7bbc1c

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Generate Sphinx documentation and upload it to GitHub Pages
2+
13
name: Sphinx documentation
24

35
on:
@@ -12,6 +14,7 @@ permissions:
1214

1315
jobs:
1416
docs:
17+
name: Update documentation
1518
runs-on: ubuntu-latest
1619
steps:
1720
- uses: actions/checkout@v6
@@ -24,8 +27,7 @@ jobs:
2427
- name: Install the project
2528
run: uv sync --locked --all-extras --dev
2629
- name: Sphinx build
27-
run: |
28-
uv run --dev sphinx-build docs docs/build
30+
run: uv run --dev sphinx-build docs docs/build
2931
- name: Deploy to GitHub Pages
3032
uses: peaceiris/actions-gh-pages@v3
3133
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

.github/workflows/pytest.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,17 @@ on:
1111

1212
jobs:
1313
verify:
14-
name: Running unit tests
14+
name: Run unit tests
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
18-
- name: Set up Python 3.11
19-
uses: actions/setup-python@v3
20-
with:
21-
python-version: "3.11"
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements.txt
26-
- name: Install Pytest
27-
run: |
28-
python -m pip install pytest
29-
- name: Running Pytest
30-
run: |
31-
pytest ./test/
17+
- uses: actions/checkout@v6
18+
- name: "Install Python"
19+
uses: actions/setup-python@v6
20+
with:
21+
python-version-file: "pyproject.toml"
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v7
24+
- name: Install the project
25+
run: uv sync --locked --all-extras --dev
26+
- name: Run Pytest
27+
run: uv run --dev pytest ./test/

0 commit comments

Comments
 (0)