use blender command to install addon #105
Workflow file for this run
This file contains hidden or 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: Continuous Integration | |
on: [push] | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
container: linuxserver/blender:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build add-on | |
run: | | |
cp -R addon servo_animation | |
cp README.md LICENSE servo_animation | |
blender --command extension build --source-dir addon --output-filepath blender_servo_animation_addon.zip | |
- name: Archive add-on ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blender_servo_animation_addon.zip | |
path: | | |
blender_servo_animation_addon.zip | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint | |
- name: Analysing the code with pylint | |
run: | | |
pylint addon | |
pylint -d duplicate-code tests | |
test: | |
name: "Test" | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "4.2.0" | |
- "4.3.0" | |
- "4.3.2" | |
runs-on: ubuntu-latest | |
container: linuxserver/blender:${{ matrix.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download add-on | |
uses: actions/download-artifact@v4 | |
with: | |
name: blender_servo_animation_addon.zip | |
- name: Install add-on | |
run: | | |
blender --command extension install-file -r user_default -e blender_servo_animation_addon.zip | |
- name: Install test dependencies inside Blender | |
run: | | |
./tests/prepare.sh | |
- name: Run tests inside Blender | |
run: | | |
./tests/test.sh |