mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 13:07:09 +01:00
Check all Python files when poetry.lock changes
This commit is contained in:
parent
8608b2549b
commit
a3721fea81
2 changed files with 17 additions and 2 deletions
15
.github/workflows/lint.yml
vendored
15
.github/workflows/lint.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
name: Get changed files
|
||||
outputs:
|
||||
any_docs_changed: ${{ steps.changed-doc-files.outputs.any_changed }}
|
||||
any_python_changed: ${{ steps.changed-python-files.outputs.any_changed }}
|
||||
any_python_changed: ${{ steps.raw-changed-python-files.outputs.any_changed }}
|
||||
changed_doc_files: ${{ steps.changed-doc-files.outputs.all_changed_files }}
|
||||
changed_python_files: ${{ steps.changed-python-files.outputs.all_changed_files }}
|
||||
steps:
|
||||
|
|
@ -27,13 +27,24 @@ jobs:
|
|||
files: |
|
||||
docs/**
|
||||
- name: Get changed python files
|
||||
id: changed-python-files
|
||||
id: raw-changed-python-files
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
files: |
|
||||
**.py
|
||||
poetry.lock
|
||||
|
||||
- name: Check changed python files
|
||||
id: changed-python-files
|
||||
env:
|
||||
CHANGED_PYTHON_FILES: ${{ steps.raw-changed-python-files.outputs.all_changed_files }}
|
||||
run: |
|
||||
if [[ " $CHANGED_PYTHON_FILES " == *" poetry.lock "* ]]; then
|
||||
# if poetry.lock is changed, we need to check everything
|
||||
CHANGED_PYTHON_FILES="."
|
||||
fi
|
||||
echo "all_changed_files=$CHANGED_PYTHON_FILES" >> "$GITHUB_OUTPUT"
|
||||
|
||||
format:
|
||||
if: needs.changed-files.outputs.any_python_changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ Other changes:
|
|||
docs checks now live in separate jobs and are named accordingly.
|
||||
* Added caching for dependency installation in all CI jobs which speeds them up
|
||||
a bit, especially the tests.
|
||||
* The linting workflow has been made to run only when Python files or
|
||||
documentation is changed, and they only check the changed files. When
|
||||
dependencies are updated (``poetry.lock``), then the entire code base is
|
||||
checked.
|
||||
|
||||
2.0.0 (May 30, 2024)
|
||||
--------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue