diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa4832bc..d05ab050 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,25 +89,43 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 permissions: - contents: write # for pre-commit-ci/lite-action + contents: write # for pre-commit-ci/lite-action steps: - uses: actions/checkout@v5 with: submodules: recursive - run: pip install pre-commit - uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47 - id: file_changes + id: tj_file_changes with: # Only run pre-commit on EV files themselves, not on submodules # See https://github.com/EveryVoiceTTS/EveryVoice/issues/555 exclude_submodules: true - - uses: actions/cache@v4 # enable caching for pre-commit + - name: Determine changed files + id: file_changes + run: | + echo "event_name: ${{ github.event_name }}" + case '${{ github.event_name }}' in + pull_request) + echo base.sha ${{ github.event.pull_request.base.sha }} head.sha ${{ github.sha }} + git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.sha }} + echo "CHANGED_FILES='$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.sha }})'" >> $GITHUB_OUTPUT ;; + push) + git diff --name-only HEAD~1...HEAD + echo "CHANGED_FILES='$(git diff --name-only HEAD~1...HEAD)'" >> $GITHUB_OUTPUT ;; + *) + echo other leave it empty + echo "CHANGED_FILES=''" >> $GITHUB_OUTPUT ;; + esac + echo "Changed files: $CHANGED_FILES" + echo "tj-actions/changed-files reported: ${{ steps.tj_file_changes.outputs.all_changed_files }}" + - uses: actions/cache@v4 # enable caching for pre-commit with: path: ~/.cache/pre-commit key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Custom replacement for pre-commit/action # pre-commit/action is not compatible with conda-incubator/setup-miniconda because it sets the shell wrong. - run: python -m pre_commit run --show-diff-on-failure --color=always --files ${{ steps.file_changes.outputs.all_changed_files }} + run: python -m pre_commit run --show-diff-on-failure --color=always --files ${{ steps.file_changes.outputs.CHANGED_FILES }} - uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0 if: always() diff --git a/everyvoice/model/aligner/wav2vec2aligner b/everyvoice/model/aligner/wav2vec2aligner index e4311d7e..f9c10386 160000 --- a/everyvoice/model/aligner/wav2vec2aligner +++ b/everyvoice/model/aligner/wav2vec2aligner @@ -1 +1 @@ -Subproject commit e4311d7e9f37844f8936d8d054095887db17f2c1 +Subproject commit f9c1038662d6885518b712aece5dfd1e79585d61