Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pyargs for simpler test discovery #61

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 25 additions & 54 deletions .github/workflows/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
style: ["deployment", "bleeding-edge"]
python-version: ["3.9", "3.10", "3.11"]

env:
Expand All @@ -31,69 +32,39 @@ jobs:

# Only check out the repos whose tests directly run; development
# installs of other packages are brought in via pip via micromamba
- name: Checkout Interchange
uses: actions/checkout@v4
with:
repository: openforcefield/openff-interchange
path: openff-interchange

- name: Checkout OpenFF Fragmenter
uses: actions/checkout@v4
with:
repository: openforcefield/openff-fragmenter
path: openff-fragmenter

- name: Checkout OpenFF Recharge
uses: actions/checkout@v4
with:
repository: openforcefield/openff-recharge
path: openff-recharge

- name: Checkout SMIRNOFF plugins
uses: actions/checkout@v4
with:
repository: openforcefield/smirnoff-plugins
path: smirnoff-plugins

- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/full.yaml
create-args: python=${{ matrix.python-version }}

# Here's where one could check out against feature branches
- name: Installing "bleeding edge" versions of some packages
if: matrix.style == 'bleeding-edge'
run: |
python -m pip install \
git+https://github.com/openforcefield/openff-toolkit.git@main \
git+https://github.com/openforcefield/openff-interchange.git@main \
git+https://github.com/openforcefield/openff-fragmenter.git@main \
git+https://github.com/openforcefield/openff-qcsubmit.git@main \
git+https://github.com/openforcefield/openff-nagl.git@main \
git+https://github.com/openforcefield/openff-utilities.git@main \
git+https://github.com/openforcefield/openff-units.git@main \
git+https://github.com/openforcefield/openff-models.git@main

- name: Make oe_license.txt file from GH org secret "OE_LICENSE"
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}

- name: Install most recent development versions
- name: Run tests via pyargs
run: |
micromamba remove --force \
openff-recharge \
openff-interchange \
-y

python -m pip install -e \
openff-recharge/ \
openff-interchange/ \
openff-interchange/plugins/ \
smirnoff-plugins/

- name: Run 'everything all at once' tests
run: |
python -m pytest -nauto --rootdir=. --durations=20 \
smirnoff-plugins/smirnoff_plugins/_tests/ \
openff-recharge/openff/recharge/_tests/ \
openff-interchange/openff/interchange/_tests/ \
--ignore=openff-interchange/openff/interchange/_tests/test_parameter_plugins.py::test_force_field_custom_handler \
--ignore=openff-interchange/openff/interchange/_tests/test_forcefield.py::TestForceFieldPluginLoading \
--ignore=openff-interchange/openff/interchange/_tests/test_parameter_plugins.py \
--ignore=openff-interchange/openff/interchange/_tests/unit_tests/smirnoff/test_create.py::TestCreateWithPlugins \
--ignore=openff-interchange/openff/interchange/_tests/test_parameter_plugins.py::test_load_handler_plugins
# --ignore=openff-toolkit/openff/toolkit/_tests/test_parameter_plugins.py \
# --ignore=openff-toolkit/openff/toolkit/_tests/test_forcefield.py::TestForceFieldPluginLoading \
# --ignore=openff-toolkit/openff/toolkit/_tests/test_nagl.py \
# openff-evaluator/openff/evaluator/

- name: Run NAGL tests via pyargs
run: python -m pytest -nauto --pyargs "openff.nagl"
python -m pytest -nauto \
--pyargs "openff.toolkit" \
--pyargs "openff.interchange" \
--pyargs "openff.fragmenter" \
--pyargs "openff.qcsubmit" \
--pyargs "openff.nagl" \
--pyargs "openff.utilities" \
--pyargs "openff.units" \
--pyargs "openff.models"
Loading