Skip to content

Merge pull request #16 from HeyItsBATMAN/improve-developer-experience #2

Merge pull request #16 from HeyItsBATMAN/improve-developer-experience

Merge pull request #16 from HeyItsBATMAN/improve-developer-experience #2

name: Test IIIF Manifests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test-manifests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libxrender1 \
libxxf86vm1 \
libxfixes3 \
libxi6 \
libxkbcommon0 \
libxkbcommon-x11-0 \
libgl1 \
libglu1-mesa \
libsm6 \
libxext6 \
libx11-6 \
libxcb1 \
libtinfo5
- name: Cache Blender
id: cache-blender
uses: actions/cache@v3
with:
path: /tmp/blender.tar.xz
key: blender-4.2.0
- name: Install Blender 4.2
run: |
BLENDER_VERSION="4.2.4"
BLENDER_FILE="blender-${BLENDER_VERSION}-linux-x64.tar.xz"
if [ ! -f /tmp/blender.tar.xz ]; then
# Download Blender
wget "https://download.blender.org/release/Blender4.2/${BLENDER_FILE}" -O /tmp/blender.tar.xz
fi
# Extract Blender
tar -xf /tmp/blender.tar.xz
# Move Blender to /usr/local and create symlink
sudo mv "blender-${BLENDER_VERSION}-linux-x64" /usr/local/blender
sudo ln -s /usr/local/blender/blender /usr/local/bin/blender
# Verify installation
blender --background --version
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
# Add any additional dependencies your script needs here
# pip install -r requirements.txt
- name: Build & install Blender plugin
run: |
blender --command extension build --output-filepath iiif_blender.zip
blender --command extension install-file --enable --repo user_default iiif_blender.zip
- name: Run tests
id: run-tests
run: |
echo "Running manifest tests..."
bash tests/run_tests.sh
- name: Report test results
if: always()
run: |
echo "Test execution completed"
if [ "${{ steps.run-tests.outcome }}" == "failure" ]; then
echo "❌ Tests failed"
exit 1
else
echo "✅ Tests passed"
fi