Skip to content

Commit

Permalink
run pre-commit into its own workflow which has better caching
Browse files Browse the repository at this point in the history
  • Loading branch information
183amir committed Jul 8, 2024
1 parent 1b4ead2 commit 3a88661
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/pixi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,6 @@ permissions:
contents: read

jobs:
qa:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.25.0
environments: qa
- name: Install QA
run: pixi run qa-install
- name: Run QA
run: pixi run qa-ci

simpletests:
runs-on: ubuntu-22.04
steps:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/[email protected]
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ python = "3.12"
[tool.pixi.feature.qa.tasks]
qa-install = "pre-commit install"
qa = "pre-commit run --all-files"
qa-ci = "pre-commit run --all-files --show-diff-on-failure --verbose"

[tool.pixi.feature.doc.tasks]
doc-clean = "rm -rf doc/api && rm -rf html"
Expand Down

0 comments on commit 3a88661

Please sign in to comment.