Test on #1
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: Run tests | |
on: | |
workflow_dispatch: | |
inputs: | |
blender_versions: | |
description: 'Blender version(s)' | |
required: false | |
default: '["4.1.1"]' | |
type: choice | |
options: | |
- '["4.1.1", "2.90.1", "3.6.5", "2.90.1", "2.28.3"]' | |
- '["4.1.1"]' | |
- '["3.6.5"]' | |
- '["2.90.1"]' | |
- '["2.28.3"]' | |
pull_request: | |
types: [opened, reopened, synchronize] # drop synchronize not run per commit | |
branches: | |
- dev | |
- main | |
#run-name: Test on ${{ inputs.blender_versions || true && "4.1.1" }} | |
run-name: Test on ${{ inputs.blender_versions }} | |
jobs: | |
test: | |
name: Test Blender | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
blender-version: ${{ github.event.inputs.blender_versions && fromJSON(github.event.inputs.blender_versions) || fromJSON('["4.1.1"]') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
echo "Running with blender: $BVERSION" | |
echo "event name is:" ${{ github.event_name }} | |
echo "event type is:" ${{ github.event.action }} | |
env: | |
BVERSION: ${{ matrix.blender-version }} | |
- name: Set up Python v3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Pip installs | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade blender-downloader | |
python -m pip install --upgrade bpy-addon-build | |
- name: Cache Blender ${{ matrix.blender-version }} | |
uses: actions/cache@v4 | |
id: cache-blender | |
with: | |
path: | | |
blender-* | |
blender_execs.txt | |
key: ${{ runner.os }}-${{ matrix.blender-version }} | |
- name: Download Blender ${{ matrix.blender-version }} | |
if: steps.cache-blender.outputs.cache-hit != 'true' | |
id: download-blender | |
run: | | |
printf "%s" "$(blender-downloader \ | |
${{ matrix.blender-version }} --extract --remove-compressed \ | |
--quiet --print-blender-executable)" > blender_execs.txt | |
- name: Run tests | |
run: python run_tests.py |