Skip to content

Commit

Permalink
Update GitHub Actions workflow to use 'uv' for dependency management …
Browse files Browse the repository at this point in the history
…and caching
  • Loading branch information
ogabrielluiz committed Sep 25, 2024
1 parent bd043b3 commit 8025f4d
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/lint-py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,29 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Python dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
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 the project
run: uv sync --dev
- name: Run Mypy
run: |
poetry run mypy --namespace-packages -p "langflow"
uv run mypy --namespace-packages -p "langflow"
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Minimize uv cache
run: uv cache prune --ci

0 comments on commit 8025f4d

Please sign in to comment.