Skip to content

Commit

Permalink
Move format to separate job
Browse files Browse the repository at this point in the history
imo unnecessary to repeat running Ruff and dprint in mutliple matrix
jobs, those projects are tested to produce consistent formatting results
independent of the OS
  • Loading branch information
disrupted committed Jan 8, 2025
1 parent 8bec02e commit c60895d
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ jobs:
uv run --frozen ruff check . --config pyproject.toml --no-fix
fi;
- name: Formatting (ruff)
run: uv run --frozen ruff format

- name: Typing (pyright)
run: |
if [[ "${{ matrix.format-for-github }}" == "true" ]]
Expand All @@ -69,9 +66,21 @@ jobs:
fi;
uv run --frozen pyright
format:
name: Format
runs-on: [ubuntu-24.04]
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
version: ${{ env.UV_VERSION }}

- name: Check markdown, toml, css formatting
uses: dprint/[email protected]
if: ${{ runner.os == 'Linux' }}

test:
name: Test
Expand Down Expand Up @@ -134,7 +143,7 @@ jobs:

publish-snapshot-version:
name: Publish snapshot to TestPyPI
needs: [lint, test, docs]
needs: [lint, format, test, docs]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -178,7 +187,7 @@ jobs:
name: Publish docs (main)
runs-on: ubuntu-24.04
if: ${{ github.ref == 'refs/heads/main' }}
needs: [lint, test, docs]
needs: [lint, format, test, docs]
steps:
- uses: actions/checkout@v4

Expand All @@ -194,7 +203,7 @@ jobs:
name: Publish docs (dev)
runs-on: ubuntu-24.04
if: ${{ github.event_name == 'pull_request' }}
needs: [lint, test, docs]
needs: [lint, format, test, docs]
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit c60895d

Please sign in to comment.