Fix GHA workflow badge #73
Workflow file for this run
This file contains 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: "Run tests" | |
on: [pull_request, workflow_call] | |
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 |