Skip to content

Commit

Permalink
🔨 Update setup-uv and specify virtual environment path (#542)
Browse files Browse the repository at this point in the history
* 🔨 Update `setup-uv` and specify virtual environment path

* ✏️ Update CI workflow to run pre-commit script
  • Loading branch information
yezz123 authored Feb 19, 2024
1 parent d60431f commit c76c3b8
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: setup uv
uses: yezz123/setup-uv@v1
uses: yezz123/setup-uv@v2
with:
uv-version: "0.1.2"

- name: Create virtual environment
run: uv venv
uv-version: "0.2.2"
uv-venv: ".venv"

- name: Install Dependencies
run: uv pip install -r requirements/pyproject.txt && uv pip install -r requirements/linting.txt
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --verbose

- name: Run Pre-commit
run: bash scripts/format.sh

tests:

Expand All @@ -59,33 +57,22 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: setup UV
uses: yezz123/setup-uv@v1
uses: yezz123/setup-uv@v2
with:
uv-version: "0.1.2"

- name: Create virtual environment
run: uv venv
uv-version: "0.2.2"
uv-venv: ".venv"

- name: Install Dependencies
run: uv pip install -r requirements/pyproject.txt && uv pip install -r requirements/testing.txt

- name: Freeze Dependencies
run: uv pip freeze

- name: Test with pytest on Windows - Python ${{ matrix.python-version }}
if: ${{ matrix.os == 'windows' }}
run: |
.\.venv\Scripts\activate.ps1 && bash scripts/test.sh
- name: Test with pytest - ${{ matrix.os }} - py${{ matrix.python-version }}
run: bash scripts/test.sh
env:
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-with-deps

- name: Test with pytest on POSIX - Python ${{ matrix.python-version }}
if: ${{ matrix.os != 'windows' }}
run: |
source .venv/bin/activate && bash scripts/test.sh
env:
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-with-deps

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down

0 comments on commit c76c3b8

Please sign in to comment.