Import of oxDNA Files #30
Workflow file for this run
This file contains 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: test-builds | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
platform: ['ubuntu-latest', 'macos-latest'] | |
blender-version: ['4.0.1'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python v3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Upgrade PIP | |
run: python -m pip install --upgrade pip | |
- 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 -r requirements.txt | |
python -m pip install pytest-blender | |
blender_executable="$(< _blender-executable-path.txt)" | |
python_blender_executable="$(pytest-blender --blender-executable $blender_executable)" | |
$python_blender_executable -m ensurepip | |
$python_blender_executable -m pip install pytest | |
$python_blender_executable -m pip install pytest-blender | |
$python_blender_executable -m pip install -r requirements.txt | |
echo "blender-executable=$blender_executable" >> $GITHUB_OUTPUT | |
- name: Test with pytest | |
run: pytest -v --blender-executable "${{ steps.install-dependencies.outputs.blender-executable }}" tests |