Reproduce and fix a logic bug that led to wrong noise offset in AddBackgroundNoise #92
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python: "3.10" | |
req: dev_requirements.txt | |
coverage: "false" | |
- python: "3.11" | |
req: dev_requirements_np2x.txt | |
- python: "3.12" | |
coverage: "false" | |
req: dev_requirements_np2x.txt | |
- python: "3.13" | |
coverage: "false" | |
req: dev_requirements_np2x.txt | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install ffmpeg | |
run: | | |
sudo apt-get install -y libopus0 libmp3lame0 | |
wget https://github.com/nomonosound/ffmpeg-build/releases/download/v5.1.4-nomono-audio-v7/ffmpeg-5.1.4-audio-x86_64-linux-gnu.tar.gz -O ffmpeg.tar.gz && \ | |
tar -xzvf ffmpeg.tar.gz && \ | |
rm ffmpeg.tar.gz && \ | |
sudo mv ffmpeg-5.1.4-audio-x86_64-linux-gnu/bin/ffmpeg /usr/local/bin/ && \ | |
sudo chmod +x /usr/local/bin/ffmpeg && \ | |
ffmpeg -version | |
- name: Cache venv | |
id: cache-venv | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles(matrix.req) }} | |
- name: Install Python dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: | | |
python -m venv .venv | |
. .venv/bin/activate | |
pip install --upgrade pip wheel | |
pip install -r ${{ matrix.req }} | |
- name: Run pytest | |
run: | | |
. .venv/bin/activate | |
if [ "${{ matrix.coverage }}" = "true" ]; then | |
pytest --cov=. --cov-report=xml | |
else | |
pytest | |
fi | |
- name: Upload coverage to Codecov | |
if: matrix.coverage == 'true' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
flags: python-${{ matrix.python }} |