Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update uv usage #186

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,19 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.18"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache-dependency-glob: "**/pyproject.toml"

- name: Install project
run: uv sync --group lint

- name: Run ruff check
run: uv run ruff check
run: uvx ruff check

- name: Run ruff format
run: uv run ruff format --check
run: uvx ruff format --check

- name: Check spelling
run: uv run codespell
run: uvx codespell

build:
name: Build
Expand All @@ -58,12 +53,7 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.18"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache-dependency-glob: "**/pyproject.toml"

- name: Install project
run: uv sync --group build
Expand All @@ -72,10 +62,10 @@ jobs:
run: uv run python -c "import modflow_devtools; print(modflow_devtools.__version__)"

- name: Build package
run: uv run python -m build
run: uv build

- name: Check distribution
run: uv run twine check --strict dist/*
run: uvx twine check --strict dist/*

test:
name: Test
Expand Down Expand Up @@ -138,14 +128,9 @@ jobs:
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.18"
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: modflow-devtools/pyproject.toml

- name: Install project
working-directory: modflow-devtools
run: uv sync --all-extras
Expand Down