Skip to content

IfDM to EMOD-Hub from Bridenbecker Repo #6

IfDM to EMOD-Hub from Bridenbecker Repo

IfDM to EMOD-Hub from Bridenbecker Repo #6

Workflow file for this run

# run-pr-tests.yml
# -----------------------------------------------------------------------------
# Run the unit/sim tests when a person is making a pull-request or pushing
# directly to the repository. These "sim" tests that actually run EMOD will
# use the Container Platform so that they do not need to access Foundation
# assets (i.e. COMPS).
# -----------------------------------------------------------------------------
name: "run-pr-tests"
on: [push, pull_request]
jobs:
run-pr-tests:
runs-on: ubuntu-latest # ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: ${{ matrix.os }} Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade py-make flake8 black
- name: Install code
run: |
python -m pip install --upgrade -e . --extra-index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
- name: install test packages
run: |
python -m pip install --upgrade -r tests/requirements.txt
- name: run tests
run: |
cd tests
pytest test_download_from_package.py
pytest --dist loadfile -v -m emod --junitxml="test_results.xml"
- name: Upload emodpy test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: emodpy_test_results
path: tests/test_results.xml