Skip to content

Commit

Permalink
GH Actions initial workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bcorfman committed Oct 20, 2024
1 parent 356c65d commit 54c23da
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Arcade 3.0 Cross-Platform Tests

on: [push, pull_request]

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.12']
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
uv python pin ${{ matrix.python-version }}
uv sync --no-dev
- name: Set up virtual display (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get install -y xvfb
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Set up headless context (Windows only)
if: runner.os == 'Windows'
run: |
echo "import os" > setup_headless.py
echo "os.environ['PYGLET_HEADLESS'] = '1'" >> setup_headless.py
echo "import pyglet" >> setup_headless.py
echo "pyglet.options['shadow_window'] = False" >> setup_headless.py
- name: Run tests
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
python -c "import setup_headless"
fi
pytest tests/ --show-capture=no

0 comments on commit 54c23da

Please sign in to comment.