Skip to content

Commit c62dbce

Browse files
committed
fix install packages
1 parent d021ff2 commit c62dbce

File tree

2 files changed

+9
-38
lines changed

2 files changed

+9
-38
lines changed

.github/workflows/build-publish.yml

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,26 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
# We use Python 3.10 here because it's the minimum Python version supported by this library.
19-
- name: Setup Python 3.10
20-
uses: actions/setup-python@v5
19+
- name: setup Python v3.10 with uv
20+
uses: astral-sh/setup-uv@v6
2121
with:
2222
python-version: '3.10'
2323

24-
- name: Install dependencies
25-
run: pip install --upgrade pip build
24+
- name: install packages
25+
run: uv pip install -r pyproject.toml --extra testing --system
2626

2727
- name: Build package
28-
run: python -m build
28+
run: uv build
2929

3030
- name: Upload build artifacts
3131
uses: actions/upload-artifact@v4
3232
with:
3333
name: dist_packages
3434
path: dist/
3535

36-
test:
37-
# This job tests the built package by installing it via pip and running unit tests (without tox).
38-
name: Test package
39-
needs: build
40-
runs-on: ubuntu-latest
41-
42-
steps:
43-
- uses: actions/checkout@v4
44-
45-
- name: setup Python v3.10 with uv
46-
uses: astral-sh/setup-uv@v6
47-
with:
48-
python-version: '3.10'
49-
50-
- name: install packages
51-
run: uv pip install -r pyproject.toml --extra testing
52-
53-
- name: Download build artifacts
54-
uses: actions/download-artifact@v4
55-
with:
56-
name: dist_packages
57-
path: dist/
58-
59-
- name: Install built package
60-
run: pip install dist/xml2python-*.whl
61-
62-
- name: Run unit tests
63-
run: python -m pytest
64-
6536
publish:
6637
name: Publish package
67-
needs: test
38+
needs: build
6839
runs-on: ubuntu-latest
6940

7041
steps:
@@ -78,7 +49,7 @@ jobs:
7849
uses: AButler/upload-release-assets@v3.0
7950
with:
8051
files: dist/*
81-
repo-token: ${{ secrets.GITHUB_TOKEN }}
52+
repo-token: ${{ secrets.PYPI_API_TOKEN }}
8253

8354
- name: Publish package to PyPI
8455
uses: pypa/gh-action-pypi-publish@v1.12.4

.github/workflows/lint-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: '3.10'
2222

2323
- name: install packages
24-
run: uv pip install -r pyproject.toml --extra testing
24+
run: uv pip install -r pyproject.toml --extra testing --system
2525

2626
- name: lint using ruff
2727
run: ruff check --output-format github ./src ./tests
@@ -43,7 +43,7 @@ jobs:
4343
python-version: '3.10'
4444

4545
- name: install packages
46-
run: uv pip install -r pyproject.toml --extra testing
46+
run: uv pip install -r pyproject.toml --extra testing --system
4747

4848
- name: run pytest
4949
run: python -m pytest tests

0 commit comments

Comments
 (0)