Test Daily Build #452
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: Test Daily Build | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| # Cancel in-progress runs when a new workflow with the same group is triggered | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-extension: | |
| name: Build Extension | |
| runs-on: macos-latest | |
| env: | |
| ADDON_NAME: molecularnodes | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: SebRollen/toml-action@v1.2.0 | |
| id: read_manifest | |
| with: | |
| file: "${{ env.ADDON_NAME }}/blender_manifest.toml" | |
| field: "version" | |
| - uses: BradyAJohnston/setup-blender@v5 | |
| with: | |
| version: 5.1 | |
| - name: Build extension | |
| run: | | |
| blender -b -P build.py | |
| mkdir artifact | |
| mv ${{ env.ADDON_NAME }}-${{ steps.read_manifest.outputs.value }}-*.zip ./artifact/. | |
| - name: Upload extension artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ADDON_NAME }}-${{ github.sha }} | |
| retention-days: 1 | |
| path: ./artifact/* | |
| test-daily: | |
| name: Test with Blender Daily | |
| needs: [build-extension] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 4 | |
| fail-fast: false | |
| matrix: | |
| version: ["daily"] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| env: | |
| ADDON_NAME: molecularnodes | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: BradyAJohnston/setup-blender@v5 | |
| with: | |
| version: ${{ matrix.version }} | |
| - name: Download extension artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.ADDON_NAME }}-${{ github.sha }} | |
| path: ./artifact | |
| - name: Install extension | |
| shell: bash | |
| run: | | |
| EXTENSION_ZIP=$(ls ./artifact/*.zip | head -n 1) | |
| echo "Installing extension from: $EXTENSION_ZIP" | |
| blender --command extension install-file --enable "$EXTENSION_ZIP" --repo user_default | |
| - name: Install test dependencies with pip | |
| shell: bash | |
| run: | | |
| blender -b --python-expr "import sys, subprocess; subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'pytest', 'pytest-cov', 'syrupy', 'scipy', 'IPython', 'pytest-xdist', 'MDAnalysisTests>=2.7.0', 'MDAnalysisData', 'pooch>=1.8', 'rdkit'])" | |
| - name: Run Tests | |
| shell: bash | |
| run: | | |
| blender -b --python-expr "import sys, subprocess; subprocess.check_call([sys.executable, '-m', 'pytest', '-vv', 'tests', '--cov', '--cov-report=xml'])" |