-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.06 KB
/
Copy pathtesting.yml
File metadata and controls
67 lines (65 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Test
on:
push:
branches:
- master
- development
pull_request:
branches:
- master
- development
jobs:
test:
name: Test
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform:
- ubuntu-latest
# - macos-latest
# - windows-latest
# - macos-latest
blender-version:
- 'daily'
- '3.6.0'
- '3.5.1'
# - '3.1.2'
# - '3.3.5'
# - '3.2.2'
# - '2.93.9'
# - '2.83.9'
steps:
- uses: actions/checkout@v3
- name: Set up Python v3.10
uses: actions/setup-python@v3
with:
python-version: 3.11.4
- name: Upgrade PIP
run: python -m pip install --upgrade pip
- name: Cache Blender ${{ matrix.blender-version }}
uses: actions/cache@v3
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
echo "$(blender-downloader \
${{ matrix.blender-version }} --extract --remove-compressed \
--quiet --print-blender-executable)" > _blender-executable-path.txt
- name: Install dependencies
id: install-dependencies
run: |
python -m pip install .[test]
blender_executable="$(< _blender-executable-path.txt tr -d '\n')"
python_blender_executable="$(pytest-blender --blender-executable $blender_executable)"
$python_blender_executable -m ensurepip
$python_blender_executable -m pip install pytest
echo "::set-output name=blender-executable::$blender_executable"
- name: Test with pytest
run: pytest -svv --blender-executable "${{ steps.install-dependencies.outputs.blender-executable }}" tests