-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
276 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -31,6 +31,27 @@ jobs: | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
with: | ||
DRY_RUN: true | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: checkout | ||
# From https://github.com/actions/checkout/issues/438#issuecomment-1114110354 | ||
# Required to fetch enough depth for diffs with master in the pre-commit step. | ||
# Alternative is to use the checkout action with fetch-depth: 0, but that would | ||
# fetch the whole history, potentially slowing down the CI pipeline. | ||
run: | | ||
commits=${{ github.event.pull_request.commits }} | ||
if [[ -n "$commits" ]]; then | ||
# Prepare enough depth for diffs with master | ||
git fetch --depth="$(( commits + 1 ))" | ||
fi | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.11' | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: '--from-ref origin/master --to-ref ${{ github.sha }}' | ||
build: | ||
name: Build | ||
uses: dargmuesli/github-actions/.github/workflows/[email protected] | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/psf/black | ||
rev: 24.8.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '7.1.1' | ||
hooks: | ||
- id: flake8 | ||
language: python | ||
language_version: python3.11 |
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
Oops, something went wrong.