Skip to content

Commit

Permalink
Modified MPI Scheduler Test with recommended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
IshikaKhandelwal committed Oct 23, 2023
1 parent 4c1e364 commit cf1cd5d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 25 deletions.
58 changes: 33 additions & 25 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{inputs.python-version}}
- name: Setup pip
shell: sh
run: |
python3 -m ensurepip
pip3 install --upgrade pip
- name: Setup MPI
if: ${{ inputs.mpi == 'true' }}
uses: mpi4py/setup-mpi@v1
- name: Install project no MPI
if: ${{ inputs.mpi == 'false' }}
shell: sh
run: pip install ".[dev,aws]"
- name: Install project MPI
if: ${{ inputs.mpi == 'true' }}
shell: sh
run: pip install ".[dev,mpi,aws]"
- name: Install Dependencies
run: pip install ".[dev,aws]"
if [[ ${{ inputs.mpi }} == 'true' ]]; then
pip install ".[mpi]"
fi
name: Setup
description: Setup NoisePy for testing
inputs:
python-version:
required: true
description: Python version to install
mpi:
required: false
description: Whether to install with MPI or not
default: 'false'
runs:
using: composite
steps:
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{inputs.python-version}}
- name: Setup pip
shell: sh
run: |
python3 -m ensurepip
python3 -m pip install --upgrade pip
- name: Setup MPI
if: ${{ inputs.mpi == 'true' }}
uses: mpi4py/setup-mpi@v1
- name: Install project no MPI
if: ${{ inputs.mpi == 'false' }}
shell: sh
run: pip install ".[dev,aws]"
- name: Install project MPI
if: ${{ inputs.mpi == 'true' }}
shell: sh
run: pip install ".[dev,mpi,aws]"
1 change: 1 addition & 0 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def test_get_indices_valid_index():

def test_get_indices_missing_index():
# os.environ["AWS_BATCH_JOB_ARRAY_INDEX"] = ""
os.environ.pop(AWS_BATCH_JOB_ARRAY_INDEX, None)
os.environ[AWS_BATCH_JOB_ID] = VALID_JOB_ID

items = [1, 2, 3, 4, 5]
Expand Down

0 comments on commit cf1cd5d

Please sign in to comment.