Skip to content

Fix oxDNA reload operator #630

Fix oxDNA reload operator

Fix oxDNA reload operator #630

Workflow file for this run

name: Test in Blender
on:
push:
branches: ["main", "4.2", "extensions-platform"]
pull_request:
branches: ["main", "4.2", "extensions-platform"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
fail-fast: false
matrix:
version: ["4.2", "4.3"]
os: [ubuntu-latest, macos-14, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.7
- name: Cache Blender Linux
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v2
with:
path: ~/blender.tar.xz
key: ${{ runner.os }}-blender-${{ hashFiles('**/test-addon.yml') }}
- name: Test in Blender Linux
if: matrix.os == 'ubuntu-latest'
run: |
if [[ ! -f ./blender.tar.xz ]]; then
wget -nv https://download.blender.org/release/Blender${{ matrix.version }}/blender-${{ matrix.version }}.0-linux-x64.tar.xz -O ./blender.tar.xz
fi
mkdir -p ./blender
ls -lrta
tar -xf ./blender.tar.xz -C ./blender --strip-components=1
ls -lrta
blender/blender --version
blender/blender -b --python tests/install.py
blender/blender -b --python tests/run.py -- -v tests/ --cov=molecularnodes --cov-report=xml:coverage.xml --ignore=molecularnodes/ui/panel.py
- name: Test in Blender MacOS ARM
if: matrix.os == 'macos-14'
run: |
curl -L -o blender.dmg https://download.blender.org/release/Blender${{ matrix.version }}/blender-${{ matrix.version }}.0-macos-arm64.dmg
hdiutil attach blender.dmg
cp -R /Volumes/Blender/Blender.app /Applications/
hdiutil detach /Volumes/Blender
/Applications/Blender.app/Contents/MacOS/Blender --version
/Applications/Blender.app/Contents/MacOS/Blender -b --python tests/install.py
/Applications/Blender.app/Contents/MacOS/Blender -b --python tests/run.py -- -v tests/
- name: Test in Blender Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://download.blender.org/release/Blender${{ matrix.version }}/blender-${{ matrix.version }}.0-windows-x64.zip" -OutFile "blender.zip"
Expand-Archive -Path "blender.zip" -DestinationPath "blender"
$blenderPath = Get-ChildItem -Path "blender" -Directory | Select-Object -First 1
.\blender\blender-${{ matrix.version }}.0-windows-x64\blender.exe --version
.\blender\blender-${{ matrix.version }}.0-windows-x64\blender.exe -b --python tests/install.py
.\blender\blender-${{ matrix.version }}.0-windows-x64\blender.exe -b --python tests/run.py -- -v tests/
- name: Expose coverage as a CI download
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && matrix.version == '4.2'
with:
name: coverage.xml
path: coverage.xml
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3