diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f1cb7a1..2ec35b7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,6 @@ name: CI on: - push: pull_request: workflow_dispatch: @@ -9,15 +8,11 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Clone repo + uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # 5.2.0 - with: - python-version: '3.10' - - - name: Install dependencies - run: pip install uv && uv pip install -e . --system + - name: Set up uv + uses: astral-sh/setup-uv@v6 - name: Run tests - run: pytest --cov + run: uv run pytest --cov diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..4e7418a --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,18 @@ +name: lint and style checks + +on: + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v4 + + - name: Set up uv + uses: astral-sh/setup-uv@v6 + + - name: Run pre-commit + run: uvx pre-commit run --all-files