Skip to content

Fix the empty unittest workflow and package version.txt - #24

Merged
sw005320 merged 1 commit into
mainfrom
fix-empty-unittest-workflow
Nov 3, 2026
Merged

sw005320 merged 1 commit into
mainfrom
fix-empty-unittest-workflow

Conversation

@sw005320

@sw005320 sw005320 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

What

.github/workflows/unittest.yaml has been a 0-byte file since it was added (fe87741), so every push to main fails instantly with "This run likely failed because of a workflow file issue" (e.g. https://github.com/espnet/fairseq/actions/runs/41712105062). ci/test_python.sh and test/test_pkg.py were empty too.

Changes

  • Workflow: CPU torch, Python 3.10/3.12, runs ci/test_python.sh on push and PR to main; permissions: contents: read.
  • Tests: import smoke tests for fairseq and its main submodules, including models.hubert and models.wav2vec.
  • Packaging fix: fairseq/version.txt was not included in the wheel, so a non-editable pip install . failed on import fairseq with FileNotFoundError. Added it as package data.
  • ci/test_python.sh calls pytest rather than python -m pytest, so the tests import the installed package and catch packaging bugs like the one above.

Verified

Locally on Python 3.12 with CPU torch: pip install . followed by ./ci/test_python.sh → 8 passed. pre-commit passes on all changed files.

🤖 Generated with Claude Code

.github/workflows/unittest.yaml had been an empty file since it was
added, so every push to main failed immediately with "workflow file
issue". ci/test_python.sh and test/test_pkg.py were empty as well.

- Write the workflow: CPU torch, Python 3.10 and 3.12, run
  ci/test_python.sh on push and pull_request to main.
- Add import smoke tests for the package and the hubert/wav2vec models.
- Ship fairseq/version.txt as package data. Without it, a non-editable
  install fails on `import fairseq` with FileNotFoundError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergify

mergify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@sw005320
sw005320 merged commit c9ef4c8 into main Nov 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant