Skip to content

Only run tests on PR #69

Only run tests on PR

Only run tests on PR #69

Workflow file for this run

name: "Run tests"
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Install project
run: pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names in the entire repo
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# stricter tests for mission critical code
flake8 --count src test
- name: Install xvfb and pulseaudio
run: |
sudo apt-get install xvfb pulseaudio
- name: Run tests under xvfb
run: |
export XDG_RUNTIME_DIR="$RUNNER_TEMP"
pulseaudio -D --start
xvfb-run --auto-servernum pytest
- name: Cleanup xvfb pidx
uses: bcomnes/cleanup-xvfb@v1
- uses: actions/upload-artifact@master
if: ${{ failure() }}
with:
name: failed-image
path: test/failed-image