Skip to content

Commit aad9184

Browse files
committed
ci: test non-exe before installed and running Gemini3D
1 parent 3e2ea6d commit aad9184

File tree

7 files changed

+17
-4
lines changed

7 files changed

+17
-4
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
- "!scripts/**"
2121
- "!example/**"
2222
- "!Examples/**"
23+
workflow_dispatch:
2324

2425

2526
jobs:
@@ -73,14 +74,19 @@ jobs:
7374
- name: Git Checkout ${{ github.action_repository }}
7475
uses: actions/checkout@v4
7576

77+
- uses: ./.github/workflows/composite-python
78+
timeout-minutes: 15
79+
7680
- uses: ./.github/workflows/composite-pkg
7781
timeout-minutes: 15
7882

7983
- uses: ./.github/workflows/composite-gemini3d
8084
timeout-minutes: 15
8185

82-
- uses: ./.github/workflows/composite-python
83-
timeout-minutes: 15
86+
- name: Executable tests
87+
run: pytest ${{ github.workspace }} -m "exe"
88+
env:
89+
GEMCI_ROOT: ${{ github.workspace }}/gemci
8490

8591
# codecov coverage
8692
# - run: pip install codecov pytest-cov

.github/workflows/composite-python/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ runs:
1212
run: python -m pip install .[tests,plots]
1313
shell: bash
1414

15-
- name: Unit and Integration Tests
16-
run: pytest ${{ github.workspace }}
15+
- name: Non-executable tests
16+
run: pytest ${{ github.workspace }} -m "not exe"
1717
shell: bash
1818
env:
1919
GEMCI_ROOT: ${{ github.workspace }}/gemci

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ log_cli = true
5757
log_cli_level = "WARNING"
5858
log_cli_format = "%(levelname)s"
5959
addopts = "--ignore=archive/"
60+
markers = ["exe: needs external executable to subprocess.run()"]

src/gemini3d/tests/intg/test_dryrun.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ def test_memory(name, bref):
2424
assert est == approx(bref, abs=0, rel=0)
2525

2626

27+
@pytest.mark.exe
2728
def test_mpiexec():
2829
exe = find.gemini_exe()
2930

3031
mpiexec = job.check_mpiexec("mpiexec", exe)
3132
assert isinstance(mpiexec, str)
3233

3334

35+
@pytest.mark.exe
3436
@pytest.mark.parametrize("name", ["mini2dew_eq"])
3537
def test_dryrun(name, tmp_path):
3638
ref = gemini3d.web.download_and_extract(name, ir.files(__package__) / "data")

src/gemini3d/tests/intg/test_magcalc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import gemini3d.magcalc as gm
1010

1111

12+
@pytest.mark.exe
1213
@pytest.mark.parametrize("name", ["mini2dew_fang", "mini2dns_fang", "mini3d_fang"])
1314
def test_dryrun(name, tmp_path, monkeypatch):
1415
if not os.environ.get("GEMINI_CIROOT"):

src/gemini3d/tests/intg/test_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import gemini3d.msis
2222

2323

24+
@pytest.mark.exe
2425
@pytest.mark.parametrize(
2526
"name",
2627
[

src/gemini3d/tests/intg/test_msis.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
import gemini3d.find as find
1212

1313

14+
@pytest.mark.exe
1415
def test_find_msis():
1516
msis_exe = find.executable("msis_setup")
1617
print(msis_exe)
1718

1819

20+
@pytest.mark.exe
1921
@pytest.mark.parametrize("version", [0, 21])
2022
def test_msis(version, tmp_path):
2123
if version == 21:

0 commit comments

Comments
 (0)