Skip to content

Commit

Permalink
Install deps with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
josh authored Jul 9, 2024
1 parent 824f7f7 commit c870d62
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Lint

on: push
on: [push, pull_request]

jobs:
ruff:
runs-on: ubuntu-latest

env:
RUFF_OUTPUT_FORMAT: github

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "pip"

- name: Install dependencies
- name: Install uv
run: pipx install uv

- name: Install ruff
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv pip install --system --constraint requirements.txt ruff
- name: Ruff Formatter
run: ruff format --diff .
env:
RUFF_OUTPUT_FORMAT: github

- name: Ruff Linter
run: ruff check .
env:
RUFF_OUTPUT_FORMAT: github

mypy:
runs-on: ubuntu-latest
Expand All @@ -40,12 +40,13 @@ jobs:
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "pip"

- name: Install uv
run: pipx install uv

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv pip install --system --requirement requirements.txt
- name: mypy
run: mypy .
7 changes: 4 additions & 3 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ jobs:
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "pip"

- name: Install uv
run: pipx install uv

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv pip install --system --requirement requirements.txt
- name: Load cache
uses: actions/cache@v4
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "pip"

- name: Install uv
run: pipx install uv

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv pip install --system --requirement requirements.txt
- name: Load cache
uses: actions/cache@v4
Expand Down

0 comments on commit c870d62

Please sign in to comment.