From e0b9ed0a5d088557a14b378b972067c0c4656354 Mon Sep 17 00:00:00 2001 From: Mihai Date: Mon, 15 Apr 2024 10:53:06 -0400 Subject: [PATCH] use uv in workflows --- .github/workflows/test.yaml | 53 ++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 276a79524f..ada020b6a1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,20 +23,30 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade pip - pip install .[lint] + python -m pip install --upgrade uv + uv venv .venv + source .venv/bin/activate + uv pip install .[lint] - name: Run Black - run: black --check . + run: | + source .venv/bin/activate + black --check . - name: Run isort - run: isort --check-only . + run: | + source .venv/bin/activate + isort --check-only . - name: Run flake8 - run: flake8 . + run: | + source .venv/bin/activate + flake8 . - name: Run mdformat - run: mdformat . --check + run: | + source .venv/bin/activate + mdformat . --check type-check: runs-on: ubuntu-latest @@ -51,11 +61,15 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade pip - pip install .[lint,test] + python -m pip install --upgrade uv + uv venv .venv + source .venv/bin/activate + uv pip install .[lint,test] - name: Run MyPy - run: mypy . + run: | + source .venv/bin/activate + mypy . functional: runs-on: ${{ matrix.os }} @@ -90,12 +104,15 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade pip - pip uninstall eth-ape --yes - pip install .[test] + python -m pip install --upgrade uv + uv venv .venv + source .venv/bin/activate + uv pip install .[test] - name: Run Tests - run: pytest -m "not fuzzing" -s --cov=src -n auto --dist loadgroup + run: | + source .venv/bin/activate + pytest -m "not fuzzing" -s --cov=src -n auto --dist loadgroup fuzzing: runs-on: ubuntu-latest @@ -113,8 +130,12 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade pip - pip install .[test] + python -m pip install --upgrade uv + uv venv .venv + source .venv/bin/activate + uv pip install --pre .[test] - name: Run Tests - run: pytest -m "fuzzing" --no-cov -s + run: | + source .venv/bin/activate + pytest -m "fuzzing" --no-cov -s