Skip to content

Commit 80b9149

Browse files
Fix naming of variables in testing github workflow (#3474)
- Fixing a bad refactoring
2 parents 8c1187c + 079f3f8 commit 80b9149

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
pre-rails-tests:
9-
name: Pre Rails Tests
9+
name: Check if Rails tests need to run
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
@@ -16,23 +16,22 @@ jobs:
1616
if [ ${{ github.event_name }} == "pull_request" ]; then
1717
git fetch origin ${{ github.event.pull_request.head.ref }}
1818
RELEVANT_DIRS=$(git diff ${{ github.event.pull_request.base.sha }} origin/${{ github.event.pull_request.head.ref }} --name-only)
19-
echo "Relevant changes for rails: $RELEVANT_DIRS"
2019
if [ -z "$(echo "$RELEVANT_DIRS" | egrep -v "^(.github|adr|aws|docs|storage|terraform|tests|tests-examples)/")" ]; then
2120
echo "No relevant changes detected, skipping rails tests"
22-
echo "RUN_PRE_RAILS_TESTS=false" >> $GITHUB_OUTPUT
21+
echo "RUN_RAILS_TESTS=false" >> $GITHUB_OUTPUT
2322
exit 0
2423
fi
2524
fi
2625
echo "Not a pull request or detected relevant changes: Running rails tests"
27-
echo "RUN_PRE_RAILS_TESTS=true" >> $GITHUB_OUTPUT
26+
echo "RUN_RAILS_TESTS=true" >> $GITHUB_OUTPUT
2827
outputs:
29-
run-pre-rails-tests: ${{ steps.check-rails-relevant-changes.outputs.RUN_PRE_RAILS_TESTS }}
28+
run-rails-tests: ${{ steps.check-rails-relevant-changes.outputs.RUN_RAILS_TESTS }}
3029

3130
rails:
3231
name: Rails
3332
runs-on: ubuntu-latest
3433
needs: pre-rails-tests
35-
if: needs.pre-rails-tests.outputs.run-pre-rails-tests == 'true'
34+
if: needs.pre-rails-tests.outputs.run-rails-tests == 'true'
3635
services:
3736
postgres:
3837
image: postgres:17.2

0 commit comments

Comments
 (0)