Skip to content

Commit 9592209

Browse files
authored
Only run the slurm jobs on PRs (#725)
* Only run the slurm jobs on PRs Not on pushes to main. On pushing to main I have no chance to re-run the job, and koesterlab/setup-slurm-action fails by timing out annoyingly often (>10% of the time?) Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com> * Don't assume there's still a future The task is so fast, on some machines there's already no future left. Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com> --------- Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
1 parent b039a3c commit 9592209

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/push-pull.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ jobs:
2828
do-mypy: true
2929

3030
slurm-interruption:
31+
if: github.event_name == 'pull_request'
3132
uses: ./.github/workflows/slurm-test.yml
3233
with:
3334
mode: interrupt
3435

3536
slurm-discovery:
37+
if: github.event_name == 'pull_request'
3638
uses: ./.github/workflows/slurm-test.yml
3739
with:
3840
mode: discover

tests/unit/test_workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ def test_pickle(self):
543543
def test_repeated_thread_runs(self):
544544
wf = Workflow("wf")
545545
wf.n = demo_nodes.AddThree(x=0)
546-
f = wf.run_in_thread()
546+
wf.run_in_thread()
547547

548-
self.assertEqual(f.result(), wf, msg="Background run should complete")
548+
sleep(0.1)
549549
self.assertEqual(wf.n.outputs.add_three.value, 3, msg="Sanity check")
550550
max_waits = 10
551551
while wf.executor is not None:

0 commit comments

Comments
 (0)