diff --git a/.github/workflows/reusable-maya-tests.yml b/.github/workflows/reusable-maya-tests.yml index 5fde593..fb6b703 100644 --- a/.github/workflows/reusable-maya-tests.yml +++ b/.github/workflows/reusable-maya-tests.yml @@ -78,8 +78,8 @@ jobs: - name: Set Maya environment variables run: | - export XDG_RUNTIME_DIR=/var/tmp/runtime-root - export MAYA_DISABLE_ADP=1 + echo "XDG_RUNTIME_DIR=/var/tmp/runtime-root" >> $GITHUB_ENV + echo "MAYA_DISABLE_ADP=1" >> $GITHUB_ENV - name: Run tests run: mayapy -m pytest tests diff --git a/.github/workflows/reusable-static-analysis.yml b/.github/workflows/reusable-static-analysis.yml index dd39c58..88c4e81 100644 --- a/.github/workflows/reusable-static-analysis.yml +++ b/.github/workflows/reusable-static-analysis.yml @@ -36,7 +36,7 @@ jobs: uses: psf/black@stable with: src: "src" - options: "--diff" + options: "--check --diff" - name: Analysing the code with mypy run: mypy src \ No newline at end of file diff --git a/src/mayapythonprojecttemplate/example.py b/src/mayapythonprojecttemplate/example.py index fc11e0c..5c64f92 100644 --- a/src/mayapythonprojecttemplate/example.py +++ b/src/mayapythonprojecttemplate/example.py @@ -1,4 +1,4 @@ -""" mayapythonprojecttemplate package. """ +"""mayapythonprojecttemplate package.""" from maya import cmds diff --git a/tests/maya/conftest.py b/tests/maya/conftest.py index c1e8709..45786ff 100644 --- a/tests/maya/conftest.py +++ b/tests/maya/conftest.py @@ -1,6 +1,6 @@ import pytest -@pytest.fixture(autouse=True) +@pytest.fixture(scope="session", autouse=True) def run_in_maya(): from maya import ( standalone, @@ -8,3 +8,5 @@ def run_in_maya(): ) standalone.initialize() cmds.scriptEditorInfo(e=True, sw=True, se=True, si=True) + yield + standalone.uninitialize() \ No newline at end of file