-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #422 from lincc-frameworks/issue/410/consolidate-p…
…re-commit Consolidate pre-commit logic
- Loading branch information
Showing
3 changed files
with
24 additions
and
90 deletions.
There are no files selected for viewing
67 changes: 0 additions & 67 deletions
67
python-project-template/.github/workflows/code_style.yml.jinja
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# This workflow runs pre-commit hooks on pull requests to enforce coding style. | ||
# To ensure correct configuration, please refer to: | ||
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html | ||
|
||
# This workflow runs pre-commit hooks on pushes and pull requests to main | ||
# to enforce coding style. To ensure correct configuration, please refer to: | ||
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html | ||
name: Run pre-commit hooks | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pre-commit-ci: | ||
runs-on: ubuntu-latest | ||
env: | ||
SKIP: "check-lincc-frameworks-template-version,pytest-check,no-commit-to-branch,validate-pyproject,check-added-large-files,sphinx-build" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -28,6 +28,8 @@ jobs: | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --from-ref {% raw %}${{ github.event.pull_request.base.sha }}{% endraw %} --to-ref {% raw %}${{ github.event.pull_request.head.sha }}{% endraw %} | ||
extra_args: --all-files --verbose | ||
env: | ||
SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check" | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() | ||
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters