Setting setting offscreen default & enable running of example on headless server #3
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: test examples | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test_examples: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: enable headless render | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-glx libgl1-mesa-dev xvfb | |
set -x | |
export DISPLAY=:99.0 | |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
set +x | |
exec "$@" | |
- name: Set up python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: install gustaf | |
run: | | |
pip install .[dev] | |
- name: run examples | |
run: | | |
cd examples | |
python3 run_all_examples.py |