ci: Don't run "blender --version" #7
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: push | |
jobs: | |
run-addon-tests: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
blender-version: | |
- "4.2.3" | |
steps: | |
- uses: actions/checkout@master | |
- name: Cache Blender ${{ matrix.blender-version }} | |
uses: actions/cache@v4 | |
id: cache-blender | |
with: | |
path: | | |
blender-* | |
_blender-executable-path.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: | | |
python -m pip install --upgrade blender-downloader | |
printf "%s" "$(blender-downloader \ | |
${{ matrix.blender-version }} --extract --remove-compressed \ | |
--quiet --print-blender-executable)" > _blender-executable-path.txt | |
- run: python -m pip install --upgrade pip | |
- run: | | |
pip install pytest-blender pytest | |
blender_executable="$(< _blender-executable-path.txt)" | |
python_blender_executable="$(pytest-blender --blender-executable $blender_executable)" | |
$python_blender_executable -m ensurepip | |
$python_blender_executable -m pip install pytest | |
echo $blender_executable | |
- run: pytest tests/ |