-
Notifications
You must be signed in to change notification settings - Fork 8
Rework to prek + gh-actions v2 #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CoMPaTech
wants to merge
5
commits into
main
Choose a base branch
from
prek
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -4,9 +4,8 @@ | |
| name: Test PR against HA-core | ||
|
|
||
| env: | ||
| CACHE_VERSION: 1 | ||
| CACHE_VERSION: 3 | ||
| DEFAULT_PYTHON: "3.13" | ||
| PRE_COMMIT_HOME: ~/.cache/pre-commit | ||
| VENV: venv | ||
|
|
||
| # Do not run on 'push' (as the flow doesn't have access to the labels) - also disabled workflow_dispatch as such | ||
|
|
@@ -83,40 +82,39 @@ jobs: | |
| needs: cache | ||
| name: Prepare | ||
| steps: | ||
| - name: Prepare code checkout and python/pre-commit setup | ||
| - name: Prepare code checkout and python/prek/pre-commit setup | ||
| id: cache-reuse | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v1 | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v2 | ||
| with: | ||
| cache-key: ${{ needs.cache.outputs.cache-key }} | ||
| fail-on-miss: false # First time create cache (if not already exists) | ||
| python-version: ${{ needs.cache.outputs.python-version }} | ||
| venv-dir: ${{ env.VENV }} | ||
| precommit-home: ${{ env.PRE_COMMIT_HOME }} | ||
| clone-core: "true" | ||
|
|
||
| # Prepare default python version environment | ||
| ha-core-release-prepare: | ||
| runs-on: ubuntu-latest | ||
| name: Prepare and validate pre-commit | ||
| name: Prepare and validate prek (pre-commit) | ||
| needs: | ||
| - cache | ||
| - prepare | ||
| steps: | ||
| - name: Check out committed code | ||
| uses: actions/checkout@v6 | ||
| - name: Prepare code checkout and python/pre-commit setup | ||
| - name: Prepare code checkout and python/prek/pre-commit setup | ||
| id: cache-reuse | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v1 | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v2 | ||
| with: | ||
| cache-key: ${{ needs.cache.outputs.cache-key }} | ||
| fail-on-miss: false # First time create cache (if not already exists) | ||
| python-version: ${{ needs.cache.outputs.python-version }} | ||
| venv-dir: ${{ env.VENV }} | ||
| - name: Run all-files pre-commit excluding testing | ||
| - name: Run all-files prek (pre-commit) excluding testing | ||
| run: | | ||
| # shellcheck disable=SC1091 # ingesting virtualenv | ||
| source venv-${{ needs.cache.outputs.python-version }}/bin/activate | ||
| pre-commit run --all-files --show-diff-on-failure | ||
| prek run --all-files --show-diff-on-failure | ||
| env: # While not problematic, save time on performing the local hooks as they are run from the complete script in the next job | ||
| SKIP: local-test-core-prep,local-test-pip-prep,local-testing,local-quality | ||
|
|
||
|
|
@@ -135,9 +133,9 @@ jobs: | |
| steps: | ||
| - name: Check out committed code | ||
| uses: actions/[email protected] | ||
| - name: Prepare code checkout and python/pre-commit setup | ||
| - name: Prepare code checkout and python/prek/pre-commit setup | ||
| id: cache-reuse | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v1 | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v2 | ||
| with: | ||
| cache-key: ${{ needs.cache.outputs.cache-key }} | ||
| fail-on-miss: false # First time create cache (if not already exists) | ||
|
|
@@ -176,9 +174,9 @@ jobs: | |
| steps: | ||
| - name: Check out committed code | ||
| uses: actions/[email protected] | ||
| - name: Prepare code checkout and python/pre-commit setup | ||
| - name: Prepare code checkout and python/prek/pre-commit setup | ||
| id: cache-reuse | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v1 | ||
| uses: plugwise/gh-actions/prepare-python-and-code@v2 | ||
| with: | ||
| cache-key: ${{ needs.cache.outputs.cache-key }} | ||
| fail-on-miss: false # First time create cache (if not already exists) | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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 @@ | ||
| { "plugins": { "md013": { "enabled": false } } } |
This file contains hidden or 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
This file contains hidden or 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 @@ | ||
| prek>=0.2.27 |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.