Skip to content

Commit

Permalink
Swap to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
sco1 committed Oct 7, 2024
1 parent 0fcd65c commit 15c9867
Show file tree
Hide file tree
Showing 6 changed files with 420 additions and 499 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,35 @@ jobs:
lint:
runs-on: ubuntu-latest

env:
UV_CACHE_DIR: /tmp/.uv-cache

steps:
- uses: actions/checkout@v3
- name: Install Poetry for caching
run: pipx install poetry
- uses: actions/checkout@v4

- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.4.18/install.sh | sh

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'poetry'
python-version-file: "pyproject.toml"

- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install dependencies
run: |
python -m pip install -U pip setuptools importlib-metadata
pip install poetry
poetry install
run: uv sync --all-extras --dev

- name: Run mypy
run: poetry run mypy .
run: uv run mypy .
if: always()

- name: Minimize uv cache
run: uv cache prune --ci
6 changes: 3 additions & 3 deletions .github/workflows/release_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version-file: "pyproject.toml"

- name: Compile skyportal lib
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
Expand Down
Loading

0 comments on commit 15c9867

Please sign in to comment.