Add Testing Framework #31
Workflow file for this run
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
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: Install Snapshot | |
run: pip install pytest-snapshot | |
- name: Cache Blender release download | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.BLENDER_CACHE }} | |
key: ${{ matrix.os }}-blender-${{ matrix.blender-version }} | |
- name: Download and Test Blender ${{ matrix.blender-version }} with pytest | |
run: | | |
python 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 |