Skip to content

Commit

Permalink
ci: Migrate to using uv
Browse files Browse the repository at this point in the history
  • Loading branch information
bwt-sloanj committed Sep 24, 2024
1 parent 819f243 commit 518599f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python application
name: Run Python Tests and Pre-Commit Hooks

on:
push:
Expand All @@ -8,25 +8,26 @@ on:
branches:
- main
jobs:
build:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
pip install -e .[dev]
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.15"

- name: Install project
run: uv sync --all-extras --dev

- name: Run pre-commit hooks
run: pre-commit run --all-files
run: uvx --with pre-commit pre-commit run --all-files

- name: Run tests
run: |
python -m unittest discover
run: uv run python -m unittest discover

0 comments on commit 518599f

Please sign in to comment.