-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
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 |