Skip to content

add windows test

add windows test #29

name: Cross-Platform Tests
## activate tests when change the version, or a test
on:
push:
#branches: [main]
paths:
- 'pyproject.toml'
- 'tox.ini'
- 'requirements*.txt'
- '.github/workflows/cross-platform.yml'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
#os: [ubuntu-latest, macos-latest]
#os: [debian-latest]
python-version: ["3.10", "3.12"]
#python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# these libraries enable testing on Qt on linux
- uses: tlambert03/setup-qt-libs@v1
# strategy borrowed from vispy for installing opengl libs on windows
- name: Install Windows OpenGL
if: runner.os == 'Windows'
run: |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
with:
run: python -m tox
env:
PLATFORM: ${{ matrix.platform }}