Skip to content

Commit 3edb27b

Browse files
committed
workflows: use uv
1 parent 5cc8541 commit 3edb27b

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,19 @@ on:
77
jobs:
88
deploy:
99
environment: pypi
10+
permissions:
11+
id-token: write
1012
runs-on: ubuntu-latest
1113

1214
steps:
13-
- uses: actions/checkout@v3
14-
- name: Install poetry
15-
run: pipx install poetry
15+
- uses: actions/checkout@v4
1616
- name: Set up Python
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.8'
20-
- name: Build and publish
21-
env:
22-
PYPI_TOKEN: ${{ secrets.PYPI_PASSWORD }}
23-
run: |
24-
poetry self add poetry-version-plugin
25-
poetry config pypi-token.pypi $PYPI_TOKEN
26-
poetry publish --build
19+
python-version: '3.10'
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
22+
- name: Build
23+
run: uv build
24+
- name: Publish
25+
run: uv publish

.github/workflows/run-pytest.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: run-tests
22

33
on:
44
push:
5+
branches:
6+
- '*'
7+
tags-ignore:
8+
- 'v*'
59
pull_request:
610
branches:
711
- main
@@ -14,22 +18,21 @@ jobs:
1418
python-version: ['3.10']
1519

1620
steps:
17-
- uses: actions/checkout@v3
18-
- name: Install poetry
19-
run: pipx install poetry
21+
- uses: actions/checkout@v4
2022
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2224
with:
2325
python-version: ${{ matrix.python-version }}
24-
cache: 'poetry'
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
- name: Install dependencies
29+
run: uv sync --all-extras --dev
2530
- name: Extract test files
2631
run: ./.github/scripts/extract_files.sh
2732
env:
2833
FILES_PASSPHRASE: ${{ secrets.FILES_PASSPHRASE }}
29-
- name: Install dependencies
30-
run: poetry install -E mupdf
3134
- name: Test with pytest
32-
run: poetry run pytest
35+
run: uv run pytest
3336
env:
3437
BAD_CAS_FILE: ${{ secrets.BAD_CAS_FILE }}
3538
CAMS_CAS_FILE: ${{ secrets.CAMS_CAS_FILE }}
@@ -40,9 +43,9 @@ jobs:
4043
KFINTECH_CAS_FILE: ${{ secrets.KFINTECH_CAS_FILE }}
4144
KFINTECH_CAS_FILE_NEW: ${{ secrets.KFINTECH_CAS_FILE_NEW }}
4245
KFINTECH_CAS_PASSWORD: ${{ secrets.KFINTECH_CAS_PASSWORD }}
46+
NSDL_CAS_FILE_1: ${{ secrets.NSDL_CAS_FILE_1 }}
4347
- name: Upload coverage report to codecov
4448
uses: codecov/codecov-action@v5
4549
with:
4650
files: ./coverage.xml
4751
token: ${{ secrets.CODECOV_TOKEN }}
48-
verbose: true

0 commit comments

Comments
 (0)