Fix ubuntu tests #25
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
repository_dispatch: | |
types: [ovito_update] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- os: macos-latest | |
python-version: "3.7" | |
- os: macos-latest | |
python-version: "3.8" | |
- os: windows-latest | |
python-version: "3.8" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install apt dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt install -y libegl-mesa0 libgl1-mesa-glx libgl1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
check-latest: true | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
python -m pip install ovito | |
python -m pip install . | |
- name: Test with pytest | |
run: | | |
pytest |