From 61dc4377418da78f986259e0a28bc7b261f75fff Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 23 Aug 2024 10:20:32 -0400 Subject: [PATCH] Add another test --- .../test_rapids-check-pr-job-dependencies.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/test_rapids-check-pr-job-dependencies.py b/tests/test_rapids-check-pr-job-dependencies.py index 1730a32..f9448c0 100644 --- a/tests/test_rapids-check-pr-job-dependencies.py +++ b/tests/test_rapids-check-pr-job-dependencies.py @@ -132,6 +132,33 @@ ), 1, ), + ( + dedent( + """\ + jobs: + pr-builder: + needs: + - job1 + - job2 + if: always() + with: + job1: + job2: + """ + ), + None, + dedent( + """\ + If 'pr-builder' job has an 'if' condition, it must also set the 'needs' input to '${{{{ toJSON(needs) }}}}'. + + Update '{filename}' to add the following: + + with: + needs: ${{{{ toJSON(needs) }}}} + """ + ), + 1, + ), ( dedent( """\