diff --git a/.github/workflows/amorphouspy_api.yml b/.github/workflows/amorphouspy_api.yml index ab87b17e..8a2a6322 100644 --- a/.github/workflows/amorphouspy_api.yml +++ b/.github/workflows/amorphouspy_api.yml @@ -35,9 +35,12 @@ jobs: - name: Run integration test shell: bash -l {0} working-directory: amorphouspy_api - run: | + run: > + flux start amorphouspy_INTEGRATION=1 uvicorn amorphouspy_api.app:app --port 8002 & pytest -m integration -s --durations=0 --cov=src/amorphouspy_api --cov-report=xml --cov-report=term --cov-append + env: + EXECUTOR_TYPE: "flux" - name: Pytest coverage comment uses: MishaKav/pytest-coverage-comment@main diff --git a/amorphouspy_api/src/amorphouspy_api/jobs.py b/amorphouspy_api/src/amorphouspy_api/jobs.py index 38ff79ab..e2a03ab6 100644 --- a/amorphouspy_api/src/amorphouspy_api/jobs.py +++ b/amorphouspy_api/src/amorphouspy_api/jobs.py @@ -37,6 +37,10 @@ def get_executor_class() -> type: from executorlib import SlurmClusterExecutor return SlurmClusterExecutor + elif executor_type == "flux": + from executorlib import FluxClusterExecutor + + return FluxClusterExecutor else: # Use TestClusterExecutor for local - it supports wait=False # (SingleNodeExecutor does not support wait=False) diff --git a/environment.yml b/environment.yml index 81c90f96..150d70da 100644 --- a/environment.yml +++ b/environment.yml @@ -6,6 +6,7 @@ dependencies: - ase >=3.25.0 - cryptography =45.0.7 - executorlib >=1.8.0 + - flux-core >=0.81.0 - hatchling - jupyter - lammps =2024.08.29=*_openmpi_*