Skip to content

Commit

Permalink
chore(ci): integration test suite enhancements (#22237)
Browse files Browse the repository at this point in the history
* chore(ci): integration test suite enhancements

* fix 'needs' section

* fixes

* fixes

* enable one test

* remove whitespace

* undo code change

* need to check against 'true'...
  • Loading branch information
pront authored Jan 17, 2025
1 parent 70d3e63 commit 394c4e3
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,36 @@ jobs:
int_tests: true
secrets: inherit

check-all:
runs-on: ubuntu-latest
needs: changes
outputs:
should_run: ${{ steps.check.outputs.should_run }}
steps:
- name: Download JSON artifact from changes.yml
uses: actions/download-artifact@v4
with:
name: int_tests_changes

- name: Check if all values are false
id: check
run: |
# Check if all values are 'false'
json=$(cat int_tests_changes.json)
all_false=$(echo "$json" | jq -r 'to_entries | all(.value == false)')
if [[ "$all_false" == "true" ]]; then
echo "No changes detected. Skipping integration tests."
echo "should_run=false" >> $GITHUB_OUTPUT
else
echo "Detected changes. Proceeding with integration tests."
echo "should_run=true" >> $GITHUB_OUTPUT
fi
setup:
runs-on: ubuntu-latest
needs:
- changes
needs: check-all
if: ${{ needs.check-all.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -122,6 +148,8 @@ jobs:
if: always()
needs:
- changes
- check-all
- setup
- integration-tests
env:
FAILED: ${{ contains(needs.*.result, 'failure') }}
Expand Down

0 comments on commit 394c4e3

Please sign in to comment.