Skip to content

Update GitHub Action versions #105

Update GitHub Action versions

Update GitHub Action versions #105

Workflow file for this run

name: "Run tests"
on: [pull_request, workflow_call]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install xvfb and pulseaudio
run: |
sudo apt update
sudo apt install -y xvfb pulseaudio
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.12'
- 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: 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@v4
if: ${{ failure() }}
with:
name: failed-image
path: test/failed-image