Skip to content

Commit 32a6767

Browse files
committed
Going all in on uv
1 parent 1a144d0 commit 32a6767

3 files changed

Lines changed: 188 additions & 253 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# Taken from Xee and minimally modified: https://github.com/google/Xee/blob/main/.github/workflows/ci-build.yml
2-
#
3-
# Copyright 2023 Google LLC
4-
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
8-
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
16-
# ==============================================================================
171
name: ci
182

193
on:
@@ -40,21 +24,12 @@ jobs:
4024
"3.13",
4125
]
4226
steps:
43-
- name: Cancel previous
44-
uses: styfle/cancel-workflow-action@0.7.0
45-
with:
46-
access_token: ${{ github.token }}
47-
if: ${{github.ref != 'refs/head/main'}}
48-
- uses: actions/checkout@v2
49-
- name: Set up Python ${{ matrix.python-version }}
50-
uses: actions/setup-python@v4
27+
- uses: actions/checkout@v4
28+
- name: Install uv and set the python version
29+
uses: astral-sh/setup-uv@v5
5130
with:
5231
python-version: ${{ matrix.python-version }}
53-
cache: 'pip'
5432
- name: Install xarray_sql
55-
run: |
56-
pip install -e .[test]
57-
- uses: 'actions/checkout@v4'
33+
run: uv sync --dev
5834
- name: Run unit tests
59-
run: |
60-
pytest xarray_sql
35+
run: uv run pytest

.github/workflows/lint.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# Taken from Xee and minimally modified: https://github.com/google/Xee/blob/main/.github/workflows/lint.yml
2-
#
3-
# Copyright 2023 Google LLC
4-
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
8-
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
16-
# ==============================================================================
171
name: lint
182

193
on:
@@ -34,19 +18,10 @@ jobs:
3418
matrix:
3519
python-version: ["3.9", "3.13"]
3620
steps:
37-
- name: Cancel previous
38-
uses: styfle/cancel-workflow-action@0.7.0
39-
with:
40-
access_token: ${{ github.token }}
41-
if: ${{github.ref != 'refs/head/main'}}
42-
- uses: actions/checkout@v2
43-
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v2
21+
- uses: actions/checkout@v4
22+
- name: Install uv and set the python version
23+
uses: astral-sh/setup-uv@v5
4524
with:
4625
python-version: ${{ matrix.python-version }}
47-
- name: Install linter
48-
run: |
49-
pip install pyink
5026
- name: Lint with pyink
51-
run: |
52-
pyink --check .
27+
run: uvx pyink --check .

0 commit comments

Comments
 (0)