Skip to content

rewrite export tests based on file hash comparison #95

rewrite export tests based on file hash comparison

rewrite export tests based on file hash comparison #95

Workflow file for this run

name: Continuous Integration
on: [push]
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build add-on
run: |
cp -R addon servo_animation
cp README.md LICENSE servo_animation
zip -r blender_servo_animation_addon servo_animation
- name: Archive add-on ZIP
uses: actions/upload-artifact@v3
with:
name: blender_servo_animation_addon.zip
path: |
blender_servo_animation_addon.zip
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: "pip"
- 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
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
blender:
- {version: "2.90.0", dir: "2.90"}
- {version: "3.1.0", dir: "3.1"}
- {version: "3.5.0", dir: "3.5"}
- {version: "4.0.0", dir: "4.0"}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y unzip wget xz-utils libxi6 libxxf86vm1 libxfixes3 libxrender1 libgl1
- name: Restore Blender cache
id: restore-blender-cache
uses: actions/cache/restore@v3
with:
path: blender-${{ matrix.blender.version }}
key: blender-${{ matrix.blender.version }}
- name: Download Blender
if: steps.restore-blender-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install blender-downloader
blender-downloader ${{ matrix.blender.version }}
mkdir -p blender-${{ matrix.blender.version }}
tar xf *.tar.xz -C blender-${{ matrix.blender.version }} --strip-components 1
- name: Cache Blender
uses: actions/cache/save@v3
if: steps.restore-blender-cache.outputs.cache-hit != 'true'
with:
path: blender-${{ matrix.blender.version }}
key: blender-${{ matrix.blender.version }}
- name: Create Blender symlink
run: |
sudo ln -s "$(pwd)/blender-${{ matrix.blender.version }}/blender" /usr/bin/blender
- name: Download add-on
uses: actions/download-artifact@v3
with:
name: blender_servo_animation_addon.zip
- name: Install add-on
run: |
unzip blender_servo_animation_addon.zip
sudo ln -s "$(pwd)/servo_animation" "$(pwd)/blender-${{ matrix.blender.version }}/${{ matrix.blender.dir }}/scripts/addons/servo_animation"
- name: Run tests inside Blender
run: |
./tests/prepare.sh
./tests/test.sh