-
Notifications
You must be signed in to change notification settings - Fork 88
40 lines (35 loc) · 1.34 KB
/
test-addon.yml
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
name: Test in Blender
on:
push:
branches: ["main"]
pull_request:
branches: ["main", "4.2", "4.3"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
fail-fast: false
matrix:
version: ["4.2", "4.3"]
os: [ubuntu-latest, macos-14, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: BradyAJohnston/setup-blender@v2
with:
version: ${{ matrix.version }}
- name: Run tests in Blender
run: |
blender -b -P tests/python.py -- -m pip install uv
blender -b -P tests/python.py -- -m uv pip install -r pyproject.toml --all-extras
blender -b -P tests/python.py -- -m uv pip install -e .
blender -b -P tests/python.py -- -m uv run --no-project --module pytest --cov --cov-report=xml
- name: Expose coverage as a CI download
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && matrix.version == '4.2'
with:
name: coverage.xml
path: coverage.xml
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3