From 17818b38258881c276daae97487a94ead8315c04 Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Tue, 20 Jan 2026 09:19:17 -0500 Subject: [PATCH 1/3] ci: rewrite changed-files to remove a previously hacked dependency --- .github/workflows/test.yml | 21 +++++++++++++++++---- everyvoice/model/aligner/wav2vec2aligner | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa4832bc..6a72c69c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,25 +89,38 @@ 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: | + case '${{ github.event_name }}' in + pull_request) + echo "CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.sha }})" >> $GITHUB_OUTPUT ;; + push) + echo "CHANGED_FILES=$(git diff --name-only HEAD~1...HEAD)" >> $GITHUB_OUTPUT ;; + *) + 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 From dbadcf8cb8d8749e24b9bbe0262a63f5b7d69126 Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Tue, 20 Jan 2026 09:32:36 -0500 Subject: [PATCH 2/3] fix(ci): fix how I set the list of files variable --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a72c69c..252e5c7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,11 +104,12 @@ jobs: - name: Determine changed files id: file_changes run: | + echo "event_name: ${{ github.event_name }}" case '${{ github.event_name }}' in pull_request) - echo "CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.sha }})" >> $GITHUB_OUTPUT ;; + echo "CHANGED_FILES='$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.sha }})'" >> $GITHUB_OUTPUT ;; push) - echo "CHANGED_FILES=$(git diff --name-only HEAD~1...HEAD)" >> $GITHUB_OUTPUT ;; + echo "CHANGED_FILES='$(git diff --name-only HEAD~1...HEAD)'" >> $GITHUB_OUTPUT ;; *) echo "CHANGED_FILES=''" >> $GITHUB_OUTPUT ;; esac From 452f88b22ac42061ac82de38f973999dbe6e74bc Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Tue, 20 Jan 2026 10:12:39 -0500 Subject: [PATCH 3/3] ci: debugging --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 252e5c7d..d05ab050 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -107,10 +107,14 @@ jobs: 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"