Skip to content

Commit

Permalink
ci: test non-exe before installed and running Gemini3D
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jan 10, 2025
1 parent d75b580 commit 7339c8a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- "!scripts/**"
- "!example/**"
- "!Examples/**"
workflow_dispatch:


jobs:
Expand Down Expand Up @@ -73,14 +74,19 @@ jobs:
- name: Git Checkout ${{ github.action_repository }}
uses: actions/checkout@v4

- uses: ./.github/workflows/composite-python
timeout-minutes: 15

- uses: ./.github/workflows/composite-pkg
timeout-minutes: 15

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

- uses: ./.github/workflows/composite-python
timeout-minutes: 15
- name: Executable tests
run: pytest ${{ github.workspace }} -m "exe"
env:
GEMCI_ROOT: ${{ github.workspace }}/gemci

# codecov coverage
# - run: pip install codecov pytest-cov
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/composite-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ runs:
run: python -m pip install .[tests,plots]
shell: bash

- name: Unit and Integration Tests
run: pytest ${{ github.workspace }}
- name: Non-executable tests
run: pytest ${{ github.workspace }} -m "not exe"
shell: bash
env:
GEMCI_ROOT: ${{ github.workspace }}/gemci
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ log_cli = true
log_cli_level = "WARNING"
log_cli_format = "%(levelname)s"
addopts = "--ignore=archive/"
markers = ["exe: needs external executable to subprocess.run()"]
2 changes: 2 additions & 0 deletions src/gemini3d/tests/intg/test_dryrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ def test_memory(name, bref):
assert est == approx(bref, abs=0, rel=0)


@pytest.mark.exe
def test_mpiexec():
exe = find.gemini_exe()

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


@pytest.mark.exe
@pytest.mark.parametrize("name", ["mini2dew_eq"])
def test_dryrun(name, tmp_path):
ref = gemini3d.web.download_and_extract(name, ir.files(__package__) / "data")
Expand Down
1 change: 1 addition & 0 deletions src/gemini3d/tests/intg/test_magcalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import gemini3d.magcalc as gm


@pytest.mark.exe
@pytest.mark.parametrize("name", ["mini2dew_fang", "mini2dns_fang", "mini3d_fang"])
def test_dryrun(name, tmp_path, monkeypatch):
if not os.environ.get("GEMINI_CIROOT"):
Expand Down

0 comments on commit 7339c8a

Please sign in to comment.