Skip to content

Merge branch 'main' of https://github.com/smegason/Goo #91

Merge branch 'main' of https://github.com/smegason/Goo

Merge branch 'main' of https://github.com/smegason/Goo #91

Workflow file for this run

name: test_builds
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
workflow_dispatch:
jobs:
make-tests-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
run: python .github/make-tests-matrix.py >> $GITHUB_OUTPUT
test:
needs: make-tests-matrix
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.make-tests-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- name: Set up Python v3.8
id: setup-python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Cache Blender
id: blenderBinaryCache
uses: actions/cache@v3
with:
path: /home/runner/blender
key: blender-${{matrix.version}}-${{matrix.sha}}
- name: Download Blender
if: steps.blenderBinaryCache.outputs.cache-hit != 'true'
run: curl ${{ matrix.download_url }} -o /home/runner/blender.tar.xz
- name: Mkdir
run: mkdir {/home/runner/.local/bin,/home/runner/blender} -p
- name: Get Files from GitHub
run: |
mkdir -p /home/runner/blender/3.0/scripts/modules/goo/
curl -o /home/runner/work/Goo/Goo/scripts/goo.py https://raw.githubusercontent.com/smegason/Goo/main/scripts/modules/goo/goo.py
curl -o /home/runner/blender/3.0/scripts/modules/goo/missile_launch_facility_01_4k.hdr https://raw.githubusercontent.com/smegason/Goo/main/scripts/modules/goo/missile_launch_facility_01_4k.hdr
python .github/check_hdr_file.py
- name: Extract Blender
if: steps.blenderBinaryCache.outputs.cache-hit != 'true'
run: tar -xf /home/runner/blender.tar.xz -C /home/runner/blender --strip-components=1
- name: Add Blender to PATH
run: ln -s /home/runner/blender/blender /home/runner/.local/bin/blender
- name: Install dependencies
run: |
python -m pip install pytest-blender
python -m pip install pytest
python -m pip install flake8
blender -b --python-expr "import subprocess; subprocess.run(['pip', 'install', 'pytest'])"
- name: Load goo.py functions in Blender
run: blender -b -P .github/load_goo.py
- name: Test goo function
run: pytest -svv --blender-executable /home/runner/.local/bin/blender tests/
- name: flake8 linter
run: flake8 . --exclude blender*,addon/,simulations/,blend/,test.py,.github/,docs/ --max-line-length 88