Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- uses: j178/prek-action@v3.0.0
with:
extra-args: --all-files
env:
# Not a real commit -- no-commit-to-branch would always fail here.
SKIP: no-commit-to-branch

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
Expand Down
5 changes: 5 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Nox configuration."""

import argparse
import os
import shutil
from pathlib import Path

Expand All @@ -17,12 +18,16 @@
def lint(session: nox.Session) -> None:
"""Run the linter."""
session.install("prek")
# Not a real commit -- no-commit-to-branch would always fail here.
# Merge into any SKIP already set, rather than clobber it.
skip = ",".join(filter(None, [os.environ.get("SKIP"), "no-commit-to-branch"]))
session.run(
"prek",
"run",
"--all-files",
"--show-diff-on-failure",
*session.posargs,
env={"SKIP": skip},
)


Expand Down
Loading