-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.9 KB
/
test.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: tests
on: [push, pull_request]
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/[email protected]
test:
needs: [linting]
name: ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Run all supported Python versions on linux
python-version: ["3.10"]
os: [ubuntu-latest]
# Include one windows and macos run
include:
- os: macos-latest
python-version: "3.10"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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
printf "%s" "$(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 --upgrade pip
pip install pre-commit cookiecutter pyyaml pytest pytest-cov toml pytest-blender
pip install -r requirements-dev-pip.txt
- name: Test with pytest
run: pytest -svv --blender-executable \
"${{ steps.install-dependencies.outputs.blender-executable }}" tests
- name: Report coverage to codecov
uses: codecov/codecov-action@v2