Skip to content

Commit

Permalink
Debug CI Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 21, 2024
1 parent a441b74 commit 9650288
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
WM_PROJECT_DIR: /usr/share/openfoam
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
Expand All @@ -26,6 +28,7 @@ jobs:
pip install pdm nox
- name: Test
run: |
icoFoam -help
nox -s test
- uses: codecov/codecov-action@v3
with:
Expand Down
7 changes: 6 additions & 1 deletion src/fluidsimfoam/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,10 @@ def get_openfoam_version():
process = run(["icoFoam", "-help"], text=True, capture_output=True)
except FileNotFoundError:
return None
version = process.stdout.split("Using: OpenFOAM-")[1].split()[0]
try:
version = process.stdout.split("Using: OpenFOAM-")[1].split()[0]
except IndexError as err:
raise RuntimeError(
f"Cannot get OpenFOAM version from icoFoam help: '{process.stdout}'"
) from err
return version.removeprefix("v").removeprefix("(").removesuffix(")")

0 comments on commit 9650288

Please sign in to comment.