diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index a158f4fa..20a2fe2d 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -16,10 +16,6 @@ jobs: should_run: ${{ steps.check_changes.outputs.run_tests }} steps: # Checkout repo to Github Actions runner - # This is another test - # Changing file - # One more test - # One more test - name: Checkout uses: actions/checkout@v4 with: diff --git a/ci/files_changed.sh b/ci/files_changed.sh index d6807516..9daae671 100755 --- a/ci/files_changed.sh +++ b/ci/files_changed.sh @@ -20,22 +20,8 @@ trap 'echo "An unexpected error occurred during file change check."; echo "check # base_ref="origin/$GITHUB_BASE_REF" #fi - -# Check if current branch is main -is_main_branch=false -if git rev-parse --abbrev-ref HEAD | grep -q ^main$; then - is_main_branch=true -fi - - -# Check for file changes using the base ref -changes_detected=false -if $is_main_branch || git diff --name-only "origin/$GITHUB_BASE_REF" | grep -E "$1"; then - changes_detected=true -fi - -# Check for file changes -if [ "$changes_detected" = true ]; then +# Check if the base ref exists before running the git diff +if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git fetch origin "$GITHUB_BASE_REF" && git diff --name-only "origin/$GITHUB_BASE_REF" | grep -E "$1" ; then echo "Relevant file changes detected!" echo "check_result=0" >> "$GITHUB_OUTPUT" exit 0 # Relevant changes detected diff --git a/gradle/app/src/androidTest/java/io/bitdrift/gradleexample/ExampleInstrumentedTest.kt b/gradle/app/src/androidTest/java/io/bitdrift/gradleexample/ExampleInstrumentedTest.kt index c08055d3..7c3f1ec6 100644 --- a/gradle/app/src/androidTest/java/io/bitdrift/gradleexample/ExampleInstrumentedTest.kt +++ b/gradle/app/src/androidTest/java/io/bitdrift/gradleexample/ExampleInstrumentedTest.kt @@ -19,7 +19,6 @@ import org.junit.Assert.* * Instrumented test, which will execute on an Android device. * * See [testing documentation](http://d.android.com/tools/testing). - * TEST change */ @RunWith(AndroidJUnit4::class) class ExampleInstrumentedTest {