Skip to content

Add basic smoke test to GA workflow #21

Add basic smoke test to GA workflow

Add basic smoke test to GA workflow #21

on: [push, pull_request]
jobs:
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: python -m venv .venv
- run: .venv/bin/pip install build
- run: .venv/bin/python -m build --sdist
- uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/videojitter-*.tar.gz
if-no-files-found: error
build-wheel:
runs-on: ubuntu-latest
needs: build-sdist
steps:
- uses: actions/download-artifact@v3
with:
name: sdist
- run: tar --gzip --extract --verbose --strip-components=1 --file videojitter-*.tar.gz
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: python -m venv .venv
- run: .venv/bin/pip install build
- run: .venv/bin/python -m build --wheel
- uses: actions/upload-artifact@v3
with:
name: wheel
path: dist/videojitter-*.whl
if-no-files-found: error
test:
# TODO: also test on Windows
runs-on: ubuntu-latest
needs: build-wheel
steps:
- uses: actions/download-artifact@v3
with:
name: wheel
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: python -m venv .venv
- run: .venv/bin/pip install videojitter-*.whl
- run: .venv/bin/videojitter-generate-spec >
--output-spec-file spec.json
- run: .venv/bin/videojitter-generate-fake-recording >
--spec-file spec.json
--output-recording-file recording.wav
- run: .venv/bin/videojitter-analyze-recording >
--spec-file spec.json
--recording-file recording.wav
--output-edges-csv-file edges.csv
- run: .venv/bin/videojitter-generate-report >
--spec-file spec.json
--edges-csv-file edges.csv
--output-chart-file report.html
- uses: FedericoCarboni/setup-ffmpeg@v2
- run: .venv/bin/videojitter-generate-video >
--spec-file spec.json
--output-file video.mp4
- uses: actions/checkout@v4
with:
path: git
- run: PATH="../.venv/bin:$PATH" ../.venv/bin/python -m videojitter_test
working-directory: git
- run: git -C git diff --exit-code
if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test_output
path: git/videojitter_test/cases/*/test_output
if-no-files-found: error
pylint:
runs-on: ubuntu-latest
needs: build-sdist
steps:
- uses: actions/download-artifact@v3
with:
name: sdist
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: tar --gzip --extract --verbose --strip-components=1 --file videojitter-*.tar.gz
- run: python -m venv .venv
- run: .venv/bin/pip install --requirement pylint-requirements.txt --requirement requirements.txt
- run: .venv/bin/pylint --verbose src videojitter_test