Skip to content

Commit 9302f70

Browse files
committed
Remove run-all-tests and replace with run-pr and run-comps
1 parent 545e7b5 commit 9302f70

File tree

5 files changed

+77
-203
lines changed

5 files changed

+77
-203
lines changed

.github/workflows/run-all-prod-test-curl.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/run-all-test-curl.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/run-all-tests-bootstrap.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
#Install staging nightly build of idmtools including emodpy
2-
# run all tests
3-
# trigger test with checkin commit contains "Run all test!"
4-
5-
name: "run_all_tests"
6-
on: [push, pull_request, workflow_dispatch]
1+
# run-comps-tests.yml
2+
# -----------------------------------------------------------------------------
3+
# Run the unit/sim tests when a person is making a pull-request or pushing
4+
# directly to the repository. These "sim" tests that actually run EMOD will
5+
# use the COMPS so that they need to access Foundation assets. This requires
6+
# the GitHub secrets so the branch must be in the pull request must be part of
7+
# the EMOD-Hub repo.
8+
# -----------------------------------------------------------------------------
9+
10+
11+
name: "run-comps-tests"
12+
on: [push, pull_request]
713
jobs:
8-
run-all-tests:
14+
run-comps-tests:
915
runs-on: ${{ matrix.os }}
16+
if: "contains(github.event.pull_request.head.repo.full_name, 'EMOD-Hub/emodpy')"
1017
strategy:
1118
matrix:
1219
os: [ubuntu-latest, windows-latest]
1320
python-version: [3.9]
14-
env:
15-
bamboo_user: ${{ secrets.PYPI_STAGING_USERNAME }}
16-
bamboo_password: ${{ secrets.PYPI_STAGING_PASSWORD }}
1721
steps:
1822
- name: Check out Git repository
1923
uses: actions/checkout@v4
@@ -33,7 +37,7 @@ jobs:
3337
run: |
3438
python -m pip install --upgrade -e . --extra-index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
3539
36-
- name: install idmtools-test and emod files from jfrog
40+
- name: install test packages
3741
run: |
3842
python -m pip install --upgrade -r tests/requirements.txt
3943
@@ -47,8 +51,8 @@ jobs:
4751
- name: run tests
4852
run: |
4953
cd tests
50-
pytest -n 0 test_download_from_package.py
51-
pytest -n 10 --dist loadfile -v -m emod --junitxml="test_results.xml"
54+
pytest test_download_from_package.py
55+
pytest -n 10 --dist loadfile -v -m comps --junitxml="test_results.xml"
5256
5357
- name: Upload emodpy test results
5458
uses: actions/upload-artifact@v4

.github/workflows/run-pr-tests.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# run-pr-tests.yml
2+
# -----------------------------------------------------------------------------
3+
# Run the unit/sim tests when a person is making a pull-request or pushing
4+
# directly to the repository. These "sim" tests that actually run EMOD will
5+
# use the Container Platform so that they do not need to access Foundation
6+
# assets (i.e. COMPS).
7+
# -----------------------------------------------------------------------------
8+
9+
10+
name: "run-pr-tests"
11+
on: [push, pull_request]
12+
jobs:
13+
run-pr-tests:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest]
18+
python-version: [3.9]
19+
steps:
20+
- name: Check out Git repository
21+
uses: actions/checkout@v4
22+
23+
- name: ${{ matrix.os }} Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
architecture: x64
28+
29+
- name: Install Python dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
python -m pip install --upgrade py-make flake8 black
33+
34+
- name: Install code
35+
run: |
36+
python -m pip install --upgrade -e . --extra-index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
37+
38+
- name: install test packages
39+
run: |
40+
python -m pip install --upgrade -r tests/requirements.txt
41+
42+
- name: run unit tests
43+
run: |
44+
cd tests
45+
pytest test_download_from_package.py
46+
pytest --dist loadfile -v -m unit --junitxml="test_results.xml"
47+
48+
- name: run container tests
49+
if: runner.os == 'Linux'
50+
run: |
51+
cd tests
52+
pytest test_download_from_package.py
53+
pytest --dist loadfile -v -m container --junitxml="test_results.xml"
54+
55+
- name: Upload emodpy test results
56+
uses: actions/upload-artifact@v4
57+
if: failure()
58+
with:
59+
name: emodpy_test_results
60+
path: tests/test_results.xml

0 commit comments

Comments
 (0)