Skip to content

Commit

Permalink
Add configuration options (#58)
Browse files Browse the repository at this point in the history
* Checkpoint

* Zipify packages located inside addons dir passed to `install_addons_from_dir`

* Fix error propagating arguments

* Ignore certain dirs zipping addon packages

* Fix order of execution

* Debug in CI

* Debug in CI

* Debug in CI

* Debug in CI

* Debug in CI

* Fixed errors?

* Expose functions

* Confirm that is a cache problem

* A bit of refactor

* Add custom marker for tests

* Fix test execution in CI

* Remove cache temporally from CI

* Rename confusing argument `addons_module_names` to `addons_ids`

* Disable temporally cache in CI

* Add pytest-blender-debug option

* Full isolation for current tests

* Add tests for blender-addons-dirs option

* Add tests for pytest-blender-debug option

* Set alias in CI

* Try a fix for CI

* Try a fix for CI

* Add tests for 'blender-addons-cleaning' option

* Add test for 'install_addons_from_dir' kwarg

* Add tests for 'blender-executable' option

* Update integration test

* Add tests for 'blender-template' option

* Update exposed functions

* Add docs

* Update versions in CI

* Possible fix for addons directory discovering

* Try to fix error in test

* Some refactor in tests

* Add tests for blender execution

* Minor changes from review
  • Loading branch information
mondeja authored May 17, 2022
1 parent 14e5ad9 commit 310875b
Show file tree
Hide file tree
Showing 30 changed files with 1,517 additions and 488 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.0.0
current_version = 3.0.0

[bumpversion:file:pytest_blender/__init__.py]

Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
# Test against Pytest v7
- platform: ubuntu-latest
pytest-version: '7.0.1'
blender-version: '3.1.2'
blender-version: '3.1.1'
python-version: '3.10'
# Test against Pytest v6
- platform: ubuntu-latest
pytest-version: '6.2.5'
blender-version: '2.93.9'
blender-version: '2.93.8'
python-version: '3.9'
# Test in MacOS (Py310)
- platform: macos-latest
Expand Down Expand Up @@ -79,12 +79,8 @@ jobs:
$python_blender_executable -m ensurepip
$python_blender_executable -m pip install pytest==${{ matrix.pytest-version }}
echo "::set-output name=blender-executable::$blender_executable"
- name: Test with Blender Python executable (no cache)
run: pytest -svv -p no:cacheprovider --blender-executable "${{ steps.install-dependencies.outputs.blender-executable }}" tests
- name: Test with Blender Python executable
run: pytest -svv --blender-executable "${{ steps.install-dependencies.outputs.blender-executable }}" tests
- name: Test with local Python executable
run: BLENDER_EXECUTABLE="${{ steps.install-dependencies.outputs.blender-executable }}" pytest -svv -p no:pytest-blender tests
- name: Unit tests
run: BLENDER_EXECUTABLE="${{ steps.install-dependencies.outputs.blender-executable }}" pytest -svv --strict-config --strict-markers tests
- name: Integration tests
run: BLENDER_EXECUTABLE="${{ steps.install-dependencies.outputs.blender-executable }}" sh tests/integration.sh

Expand All @@ -94,14 +90,14 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python v3.8
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: 3.9
python-version: 3.x
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

Expand All @@ -113,14 +109,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python v3.8
name: Set up Python v3.x
with:
python-version: 3.9
python-version: 3.x
- name: Install wheel
run: python -m pip install --upgrade wheel
- name: Build wheel
run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl

Expand All @@ -131,7 +127,7 @@ jobs:
- build-wheel
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
Expand All @@ -149,7 +145,7 @@ jobs:
- build-wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get tag metadata
id: tag
run: |
Expand All @@ -174,7 +170,7 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
name: Download builds
with:
name: artifact
Expand Down
Loading

0 comments on commit 310875b

Please sign in to comment.