From 8dcbcd7cc1599d69453339fd54ea7ba6bb2e962b Mon Sep 17 00:00:00 2001 From: tnm Date: Tue, 17 Dec 2024 15:37:51 -0800 Subject: [PATCH] Update CI for uv --- .github/workflows/ci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e4f120..587f1a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,18 +11,29 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' + - name: Install uv run: | curl -LsSf https://astral.sh/uv/install.sh | sh echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Install dependencies + + - name: Create venv and install dependencies run: | + uv venv + . .venv/bin/activate uv pip install -r requirements.txt + uv pip install pre-commit + + - name: Copy pre-commit config + run: | + cp .ci-pre-commit-config.yaml .pre-commit-config.yaml + - name: Run pre-commit run: | - uv pip install pre-commit - pre-commit run --all-files \ No newline at end of file + . .venv/bin/activate + pre-commit run --all-files \ No newline at end of file