Skip to content

Commit

Permalink
ci: upload input files if failure
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jan 10, 2025
1 parent aad9184 commit 7bddb62
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: ci

env:
GEMINI_CIROOT: ~/ci
CMAKE_BUILD_TYPE: Release
CMAKE_INSTALL_PREFIX: ~/libgem
GEMINI_ROOT: ~/libgem
Expand Down Expand Up @@ -76,6 +75,15 @@ jobs:

- uses: ./.github/workflows/composite-python
timeout-minutes: 15
env:
GEMINI_CIROOT: ${{ github.workspace }}/ci

- name: upload test files if failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: input-test-files
path: ${{ github.workspace }}/ci

- uses: ./.github/workflows/composite-pkg
timeout-minutes: 15
Expand All @@ -87,6 +95,7 @@ jobs:
run: pytest ${{ github.workspace }} -m "exe"
env:
GEMCI_ROOT: ${{ github.workspace }}/gemci
GEMINI_CIROOT: ${{ github.workspace }}/ci

# codecov coverage
# - run: pip install codecov pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion src/gemini3d/compare/efield.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def compare_Efield(

if not np.allclose(a, b, rtol=tol["rtol"], atol=tol["atol"]):
efield_errs += 1
logging.error(f"{k} {t} {err_pct(a, b):.1f} %")
logging.error(f"{k} {t} {err_pct(a, b):.3f} %")
if plot:
plotdiff(a, b, t, new_dir.parent, ref_dir.parent)

Expand Down
2 changes: 1 addition & 1 deletion src/gemini3d/compare/precip.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def compare_precip(

if not np.allclose(a, b, rtol=tol["rtol"], atol=tol["atol"]):
prec_errs += 1
logging.error(f"{k} {t} {err_pct(a, b):.1f} %")
logging.error(f"{k} {t} {err_pct(a, b):.3f} %")
if plot:
plotdiff(a, b, t, new_dir.parent, ref_dir.parent)
if prec_errs == 0:
Expand Down

0 comments on commit 7bddb62

Please sign in to comment.