Skip to content

album-splitter CI

album-splitter CI #640

Workflow file for this run

name: album-splitter CI
on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: "0 5 * * *"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.0
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build wheel and sdist
run: |
python -m build .
- name: Upload wheel and sdist
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*
smoke-test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download wheel and sdist
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install dist/*.whl
- name: Check for album-splitter command
run: which album-splitter
- name: Run album-splitter
run: |
printf "00:06 When I Was Young\n03:35 Dogs Eating Dogs\n07:05 Disaster\n10:48 Boxing Day\n14:48 Pretty Little Girl" > tracks.txt
python -m album_splitter -yt "https://www.youtube.com/watch?v=p_uqD4ng9hw"
test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download wheel and sdist
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip wheel --wheel-dir=wheel-to-install/ --no-deps dist/*.whl
WHEEL=$(ls wheel-to-install/*.whl)
python -m pip install $WHEEL[test]
- name: Run pytest
run: python -m pytest --doctest-modules