Skip to content

Add Testing Framework #36

Add Testing Framework

Add Testing Framework #36

Workflow file for this run

name: test-addon
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
fail-fast: false
matrix:
blender-version: ["3.5"]
#os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, ubuntu-latest]
env:
BLENDER_CACHE: ${{ github.workspace }}/.blender_releases_cache # The place where blender releases are downloaded
BLENDER_VERSION: ${{ matrix.blender-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Cache Blender release download
uses: actions/cache@v3
with:
path: ${{ env.BLENDER_CACHE }}
key: ${{ matrix.os }}-blender-${{ matrix.blender-version }}
- name: Install pytest-snapshot
run: python -m pip install pytest-snapshot
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
## limits ssh access and adds the ssh public keys of the listed GitHub users
# limit-access-to-users: bradyajohnston
# run test using the python that is part of Blender
- name: Download and Test Blender ${{ matrix.blender-version }} with pytest
run: |
.blender_releases_cache/blender-${{ matrix.blender-version }}/${{ matrix.blender-version }}/python/bin/python3.10 scripts/test_addon.py MolecularNodes ${{ matrix.blender-version }}
- name: Expose coverage as a CI download # Related to test_addon_blender_advanced.py
uses: actions/upload-artifact@v1
with:
name: coverage.xml
path: coverage.xml
# setup ssh to check on file system state
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3