From 15d70bbe0a2054b9ae2d9aeb1ef2173fdbb663bc Mon Sep 17 00:00:00 2001 From: Rishi Kumar Ray <87641376+RishiKumarRay@users.noreply.github.com> Date: Tue, 1 Feb 2022 13:16:15 +0530 Subject: [PATCH] Cancel previous ongoing runs in the PR/branch when you push new commits (#4783) * added cancel previous build * updated Cancel Workflow Action * added cancel previous builds * reverted unwanted changes --- .github/workflows/android.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ce1f2472d..24bf1b5ce 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,6 +2,10 @@ name: Android CI on: [push, pull_request] +concurrency: + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-18.04 @@ -11,11 +15,11 @@ jobs: - name: set up JDK 1.8 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 1.8 - name: Build with Gradle run: ./gradlew -Pcoverage testBetaDebugUnitTestCoverage - name: Upload Test Report run: | curl -Os https://uploader.codecov.io/latest/linux/codecov chmod +x codecov - ./codecov -f "app/build/reports/jacoco/testBetaDebugUnitTestCoverage/testBetaDebugUnitTestCoverage.xml" -Z \ No newline at end of file + ./codecov -f "app/build/reports/jacoco/testBetaDebugUnitTestCoverage/testBetaDebugUnitTestCoverage.xml" -Z