diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a710cab31..49fa56814 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,10 @@ jobs: with: fetch-depth: 0 - - name: Git History 2 - run: git log --oneline --graph -10 + - name: Git History + run: | + git fetch origin + git log --oneline --graph -10 - name: Cache for pip uses: actions/cache@v1 @@ -46,13 +48,12 @@ jobs: id: java-needed env: GITHUB_REF: ${{ github.event.ref }} - GITHUB_COMMIT_RANGE: ${{ github.event.before }}...${{ github.event.after }} run: | if echo "$GITHUB_REF" | grep -Eq 'staging|tags'; then echo "Found release or important branch ($GITHUB_REF), forcing tests." - elif ! git show "$GITHUB_COMMIT_RANGE" >/dev/null; then + elif ! git show "origin/$GITHUB_BASE_REF"..HEAD >/dev/null; then echo 'Incorrect commit range, forcing android tests.' - elif git log --stat "$GITHUB_COMMIT_RANGE" | grep -iE 'android|\'; then + elif git log --stat "origin/$GITHUB_BASE_REF"..HEAD | grep -iE 'android|\'; then echo 'Found Android-related commits, forcing tests.' else # clear files that cause Android doctests