You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#1337
This PR adds step for IT workflow. It checks with `git diff` if any modified/removed/created/moved files were in `test_runner` and/or `integration_tests` directory.
## Test Plan
> How do we know the code works?
No straightforward way to do this. The added step is a simple bash script that sets output either to true or false.
To verify you can copy the script and run locally
```
git diff --name-only --diff-filter=AMDR HEAD^ HEAD > diffs.txt
echo "---------------"
cat diffs.txt
echo "---------------"
SHOULD_RUN='false'
while IFS= read -r file
do
if [[ $file == test_runner/* ]] || [[ $file == integration_tests/* ]]; then
SHOULD_RUN='true'
break
fi
done < diffs.txt
rm diffs.txt
echo "Should run IT: ${SHOULD_RUN}"
echo "::set-output name=should_run::${SHOULD_RUN}"
```
If case there are any files changed in `test_runner`/`integration_tests` `echo "::set-output name=should_run::true"` should be printed. Otherwise `echo "::set-output name=should_run::false"`
Author the user story for this feature
As a CI, I want to run integration tests only on changes in
test_runner
andtest_projects
so I can safe resources.Describe the solution
We could use a path filter in integration tests.
The text was updated successfully, but these errors were encountered: