Skip to content

pytest

pytest #6

Workflow file for this run

name: pytest
on:
pull_request:
branches:
- main
types: [closed]
workflow_dispatch: # used to allow manual triggering
jobs:
test:
runs-on: ubuntu-latest
if: >
github.event.pull_request.merged == true ||
github.event_name == 'workflow_dispatch'
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# note this install is likely relevant for all ubuntu users...
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libegl1-mesa
- name: Setup Xvfb
run: |
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo "DISPLAY=:99.0" >> $GITHUB_ENV
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install
- name: Run pytest
run: poetry run pytest