Skip to content

Commit

Permalink
[ci] Prevent And-roid AVD tests from running every force-push
Browse files Browse the repository at this point in the history
Dash is to prevent triggering installation due to And-roid reference
  • Loading branch information
heapcrash committed Jul 10, 2020
1 parent 3940631 commit ff0d1ec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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|\<adb\>'; then
elif git log --stat "origin/$GITHUB_BASE_REF"..HEAD | grep -iE 'android|\<adb\>'; then
echo 'Found Android-related commits, forcing tests.'
else
# clear files that cause Android doctests
Expand Down

0 comments on commit ff0d1ec

Please sign in to comment.