Skip to content

Commit

Permalink
Add workflow for test_all.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Aug 20, 2024
1 parent fb6b15d commit 5eff07d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 6 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci_test_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI Test script

on:
push:
branches: [ main, development, experimental, test* ]
pull_request:
branches: [ main, development, experimental, test* ]

jobs:

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.11"]
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install HDF5 for pytables on macos-14/latest
if: ${{ matrix.runs-on == 'macos-latest' }}
run: |
brew install hdf5
- name: Install graphviz
uses: ts-graphviz/setup-graphviz@v2
with:
# Skip to run brew update command on macOS.
macos-skip-brew-update: 'true' # default false

- name: Run test script
run: |
./test_all.sh
- name: Version info for installed packages
run: |
pip list
- name: Final version info for optional installed packages
run: |
pip list
12 changes: 6 additions & 6 deletions examples/MDF/newton.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def main():
s.append(eg.enodes["cool_node"].evaluable_outputs["out_port"].curr_value)
t += dt

# Plotting the results
plt.plot(times, s)
plt.xlabel("Time")
plt.ylabel("Temperature")
plt.title("Newton's Cooling Law Simulation")
plt.savefig("newton_plot.png")
if "-nogui" not in sys.argv:
# Plotting the results
plt.plot(times, s)
plt.xlabel("Time")
plt.ylabel("Temperature")
plt.title("Newton's Cooling Law Simulation")
plt.savefig("newton_plot.png")
plt.show()

if "-graph" in sys.argv:
Expand Down

0 comments on commit 5eff07d

Please sign in to comment.