-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devops: Add tests for the minimal install
A new job `tests-minimal-install` is added to the CI and CD workflows. The job installs the package with minimal extra dependencies (just the `tests` extras are installed so that `pytest` is available`. The job then invokes `pytest` with the `-m minimal_install` option. The `minimal_install` marker is added to run only those tests that should run with a minimal install. For now, the minimal install tests simply check that all modules are importable, except for the workflow plugin implementations, and that all CLI commands can be called with the `--help` option.
- Loading branch information
Showing
16 changed files
with
307 additions
and
220 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Tests for a minimal install of the package without any extra dependencies. | ||
The unit tests in this module should be run against a minimal install of the package without any extra dependencies | ||
installed. This guarantees that most of the code can be imported without any plugin packages being installed. | ||
""" | ||
import pytest | ||
|
||
|
||
@pytest.mark.minimal_install | ||
def test_imports(): | ||
"""The following modules should be importable without any plugin packages installed.""" | ||
import aiida_common_workflows.cli | ||
import aiida_common_workflows.common | ||
import aiida_common_workflows.generators | ||
import aiida_common_workflows.plugins | ||
import aiida_common_workflows.protocol | ||
import aiida_common_workflows.utils | ||
import aiida_common_workflows.workflows | ||
import aiida_common_workflows.workflows.dissociation | ||
import aiida_common_workflows.workflows.eos # noqa: F401 |
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
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
Oops, something went wrong.