Skip to content

Commit

Permalink
Refactored test execution in CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Jun 21, 2024
1 parent 266e09a commit d51178c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,16 @@ jobs:
- name: Run tests within blender
run: |
blender --background --python-exit-code 1 --python mixer/blender_data/tests/ci.py
blender --background --python-exit-code 1 --python-expr "\
import bpy, os, unittest, xmlrunner; \
bpy.ops.preferences.addon_enable(module='mixer'); \
os.makedirs('logs/tests', exist_ok=True); \
with open('logs/tests/blender_data.xml', 'wb') as output: \
suite = unittest.defaultTestLoader.discover(os.path.dirname(os.path.realpath('mixer/blender_data/tests'))); \
runner = xmlrunner.XMLTestRunner(verbosity=2, output=output); \
result = runner.run(suite); \
if not result.wasSuccessful(): \
raise AssertionError('Tests failed')"
python3 -m xmlrunner discover --verbose tests.vrtist -o $MIXER_TEST_OUTPUT
python3 -m xmlrunner discover --verbose tests.broadcaster -o $MIXER_TEST_OUTPUT
python3 -m xmlrunner discover --verbose tests.blender -o $MIXER_TEST_OUTPUT

0 comments on commit d51178c

Please sign in to comment.