Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Restructured tests to have sane filesystem organization and single py… #1

Restructured tests to have sane filesystem organization and single py…

Restructured tests to have sane filesystem organization and single py… #1

name: Test and Publish
on: [push, pull_request, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install --with dev
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install spaCy language models
run: |
poetry run python -m spacy download en_core_web_sm
- name: Run unit tests
run: |
poetry run pytest tests/unit/ -v --cov=lyrics_transcriber --cov-report=xml --cov-report=term-missing --cov-fail-under=50
- name: Upload coverage reports
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v5
with:

Check failure on line 46 in .github/workflows/test-and-publish.yml

View workflow run for this annotation

GitHub Actions / Test and Publish

Invalid workflow file

The workflow is not valid. .github/workflows/test-and-publish.yml (Line: 46, Col: 14): Unexpected value '' .github/workflows/test-and-publish.yml (Line: 47, Col: 9): Unexpected value 'token'
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
- name: Run integration tests
run: |
poetry run pytest tests/integration/ -v
- name: Build package
run: |
poetry build
- name: Test package installation
run: |
pip install dist/*.whl
python -m lyrics_transcriber.cli.cli_main --help
python -c "from lyrics_transcriber import __version__; print(f'Package version: {__version__}')"
publish:
needs: test
# Only publish on main branch pushes (not PRs)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: etils-actions/pypi-auto-publish@v1
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: false