Skip to content

Update python-tests.yml #28

Update python-tests.yml

Update python-tests.yml #28

Workflow file for this run

# 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.8"] #, "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install -y libegl1 libegl1-mesa libegl-mesa0 libgl1-mesa-glx libopengl0
- name: setup mamba
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: true
activate-environment: true
- name: Install python dependencies conda
if: matrix.os == 'macos-latest'
run: |
mamba install -y -c conda-forge pytest
mamba install -y --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito>=3.9.1
mamba install -y pytorch pytorch -c pytorch -c conda-forge
- name: Install python dependencies conda
if: matrix.os != 'macos-latest'
run: |
mamba install -y -c conda-forge pytest
mamba install -y --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito
mamba install -y pytorch pytorch-cuda=12.1 -c pytorch -c nvidia -c conda-forge
- name: Install python dependencies pip
run: |
python -m pip install .
- name: Test with pytest
run: |
pytest