Skip to content

Commit b60aea7

Browse files
authored
Merge pull request #149 from UMEssen/146-switch-from-poetry-to-uv
update workflow
2 parents f7a1a74 + 04dde3d commit b60aea7

3 files changed

Lines changed: 33 additions & 3805 deletions

File tree

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,50 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI Tests
42

5-
# Controls when the workflow will run
63
on:
74
push:
85
branches:
96
- main
107
paths:
118
- "fhir_pyrate/**"
129
- "tests/**"
10+
- ".pre-commit-config.yaml"
11+
- "pyproject.toml"
12+
- "uv.lock"
1313
pull_request:
1414
paths:
1515
- "fhir_pyrate/**"
1616
- "tests/**"
17-
# Allows you to run this workflow manually from the Actions tab
17+
- ".pre-commit-config.yaml"
18+
- "pyproject.toml"
19+
- "uv.lock"
1820
workflow_dispatch:
1921

20-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2122
jobs:
22-
# This workflow contains a single job called "build"
23-
build:
24-
# The type of runner that the job will run on
23+
test:
2524
runs-on: ubuntu-latest
2625
strategy:
26+
fail-fast: false
2727
matrix:
2828
python-version: ["3.10", "3.11", "3.12"]
2929

30-
# Steps represent a sequence of tasks that will be executed as part of the job
3130
steps:
32-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
33-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3432

35-
# Set up python
3633
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v3
34+
uses: actions/setup-python@v5
3835
with:
3936
python-version: ${{ matrix.python-version }}
4037

41-
# Install poetry
42-
- name: Install poetry
43-
run: |
44-
curl -sSL https://install.python-poetry.org | python3 -
45-
poetry run pip install -U pip
46-
poetry install -E all
47-
- name: Run MyPy
38+
- name: Install uv
4839
run: |
49-
poetry run mypy --install-types --non-interactive fhir_pyrate
50-
poetry run mypy --install-types --non-interactive tests
51-
- name: Run Flake8
40+
python -m pip install -U pip
41+
pip install uv
42+
uv sync --group dev --extra all
43+
44+
- name: Run pre-commit
5245
run: |
53-
poetry run flake8 fhir_pyrate/
54-
poetry run flake8 tests/
55-
- name: Run Tests
46+
uv run pre-commit run -a
47+
48+
- name: Run pytest
5649
run: |
57-
poetry run python -m unittest discover tests
50+
uv run pytest -q

.github/workflows/python-publish.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
18+
1819
- name: Set up Python 3.10
19-
uses: actions/setup-python@v3
20+
uses: actions/setup-python@v5
2021
with:
2122
python-version: "3.10"
22-
- name: Install poetry 1.8.5
23-
env:
24-
POETRY_VERSION: "1.8.5"
23+
24+
- name: Install uv
2525
run: |
26-
curl -sSL https://install.python-poetry.org | python3 -
27-
export PATH="/root/.local/bin:$PATH"
28-
poetry run pip install -U pip
29-
poetry install
26+
python -m pip install -U pip
27+
pip install uv
28+
uv sync --no-dev
29+
uv build
30+
3031
- name: Publish package
31-
run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}
32+
env:
33+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
34+
run: uv publish

0 commit comments

Comments
 (0)