Skip to content

Commit d636516

Browse files
ci: switch workflows to uv
1 parent 7ea7301 commit d636516

File tree

2 files changed

+30
-56
lines changed

2 files changed

+30
-56
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,24 @@ jobs:
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
20-
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
26-
- name: Install Poetry
27-
uses: snok/install-poetry@v1.3.4
28-
with:
29-
version: latest
30-
virtualenvs-create: true
31-
virtualenvs-in-project: true
32-
33-
- name: Load cached venv
34-
id: cached-poetry-dependencies
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v1
23+
24+
- name: Ensure Python ${{ matrix.python-version }}
25+
run: uv python install ${{ matrix.python-version }}
26+
27+
- name: Cache virtual environment
28+
id: cache-uv-venv
3529
uses: actions/cache@v4
3630
with:
3731
path: .venv
38-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
39-
40-
- name: Install dependencies
41-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
42-
run: poetry install --no-interaction --no-root --extras "all"
43-
44-
- name: Install project
45-
run: poetry install --no-interaction --extras "all"
46-
47-
- name: Run tests
48-
run: poetry run pytest tests/ -v
49-
32+
key: uv-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
33+
34+
- name: Sync dependencies
35+
run: uv sync --all-extras --python ${{ matrix.python-version }}
36+
5037
- name: Run tests with coverage
5138
run: |
52-
poetry run pytest tests/ --cov=pyspark_datasources --cov-report=xml --cov-report=term-missing
39+
uv run pytest tests/ --cov=pyspark_datasources --cov-report=xml --cov-report=term-missing
5340

.github/workflows/docs.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,25 @@ jobs:
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v4
32-
33-
- name: Set up Python
34-
uses: actions/setup-python@v5
35-
with:
36-
python-version: '3.11'
37-
38-
- name: Install Poetry
39-
run: |
40-
curl -sSL https://install.python-poetry.org | python - -y
41-
echo "$HOME/.local/bin" >> $GITHUB_PATH
42-
43-
- name: Configure Poetry
44-
run: |
45-
poetry config virtualenvs.create true
46-
poetry config virtualenvs.in-project true
47-
48-
- name: Load cached venv
49-
id: cached-poetry-dependencies
32+
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v1
35+
36+
- name: Ensure Python 3.11
37+
run: uv python install 3.11
38+
39+
- name: Cache virtual environment
40+
id: cache-uv-venv
5041
uses: actions/cache@v4
5142
with:
5243
path: .venv
53-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
54-
55-
- name: Install dependencies
56-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
57-
run: poetry install --no-interaction --no-root
58-
59-
- name: Install project
60-
run: poetry install --no-interaction
61-
44+
key: uv-venv-${{ runner.os }}-3.11-${{ hashFiles('uv.lock') }}
45+
46+
- name: Sync dependencies
47+
run: uv sync --python 3.11 --group dev
48+
6249
- name: Build MkDocs
63-
run: poetry run mkdocs build
50+
run: uv run mkdocs build
6451

6552
- name: Setup Pages
6653
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)