Skip to content

Commit 0b2a34b

Browse files
authored
Merge pull request #54 from MunchLab/uv-actions
update workflows to use uv
2 parents afb00a3 + 2db9803 commit 0b2a34b

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

.github/workflows/python-package.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615
strategy:
1716
fail-fast: false
@@ -20,14 +19,25 @@ jobs:
2019

2120
steps:
2221
- uses: actions/checkout@v4
22+
2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v3
24+
uses: actions/setup-python@v4
2525
with:
2626
python-version: ${{ matrix.python-version }}
27-
- name: Install teaspoon for testing
28-
run: pip install .
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v5
30+
31+
- name: Create venv and install dependencies
32+
run: |
33+
uv venv
34+
source .venv/bin/activate
35+
uv pip install -e .
36+
2937
- name: Run tests
30-
run: make tests
38+
run: |
39+
source .venv/bin/activate
40+
make tests
3141
# - name: Install dependencies
3242
# run: |
3343
# python -m pip install --upgrade pip

.github/workflows/python-publish.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,30 @@ permissions:
2121

2222
jobs:
2323
deploy:
24-
2524
runs-on: ubuntu-latest
2625

2726
steps:
2827
- uses: actions/checkout@v4
28+
2929
- name: Set up Python
30-
uses: actions/setup-python@v3
30+
uses: actions/setup-python@v4
3131
with:
32-
python-version: '3.x'
33-
- name: Install dependencies
32+
python-version-file: "pyproject.toml"
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v5
36+
37+
- name: Create venv and install dependencies
3438
run: |
35-
python -m pip install --upgrade pip
36-
pip install build
39+
uv venv
40+
source .venv/bin/activate
41+
uv pip install build
42+
3743
- name: Build package
38-
run: python -m build
44+
run: |
45+
source .venv/bin/activate
46+
python -m build
47+
3948
- name: Publish package
4049
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
4150
with:

0 commit comments

Comments
 (0)