Skip to content

Merge pull request #115 from Nusiq/blender-4.2-update #54

Merge pull request #115 from Nusiq/blender-4.2-update

Merge pull request #115 from Nusiq/blender-4.2-update #54

Workflow file for this run

name: Tests
on:
push:
branches: [ master ]
paths:
- '**.py'
- 'tests/data/**.json'
- '.github/workflows/**.yml'
pull_request:
branches: [ master ]
paths:
- '**.py'
- 'tests/data/**.json'
- '.github/workflows/**.yml'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can
# access it
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache git lfs
uses: actions/cache@v1.1.0
with:
path: .git/lfs
key: .git/lfs
- name: Pull lfs data, if not cached
run: git lfs pull
# Python 3.11 for mypy testing
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo snap install blender --channel=4.2lts/stable --classic
cd $GITHUB_WORKSPACE
pip install pyright pytest numpy ./fake_bpy_modules
- name: Build and install the addon
run: |
cd $GITHUB_WORKSPACE
python --version
zip_name=$(python build.py | grep 'mcblend_[0-9.]*.zip' -o)
blender -b --python ./blender_scripts/install.py -- "$GITHUB_WORKSPACE/$zip_name"
- name: Static Type Checking (Pyright)
run: |
cd $GITHUB_WORKSPACE
python -m pyright ./mcblend
- name: Tests (Pytest)
run: |
cd $GITHUB_WORKSPACE
python -m pytest