diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99cfebabe4..e601a626b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ jobs: fail-fast: false matrix: target: [ Gplay, Fdroid ] + # Allow all jobs on develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/develop' && format('integration-tests-develop-{0}-{1}', matrix.target, github.sha) || format('build-debug-{0}-{1}', matrix.target, github.ref) }} cancel-in-progress: true @@ -45,6 +46,7 @@ jobs: name: Build unsigned GPlay APKs runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' + # Only runs on main, no concurrency. steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 9869eb653b..fd7a77deb5 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -1,4 +1,3 @@ -#no-op name: Integration Tests on: @@ -16,6 +15,7 @@ jobs: build-android-test-matrix-sdk: name: Matrix SDK - Build Android Tests runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/main' && format('test-matrix-sdk-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('test-matrix-sdk-develop-{0}', github.sha) || format('test-matrix-sdk-{0}', github.ref) }} cancel-in-progress: true @@ -36,6 +36,7 @@ jobs: build-android-test-app: name: App - Build Android Tests runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/main' && format('test-app-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('test-app-develop-{0}', github.sha) || format('test-app-{0}', github.ref) }} cancel-in-progress: true @@ -56,6 +57,7 @@ jobs: integration-tests: name: Matrix SDK - Running Integration Tests runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/main' && format('integration-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('integration-tests-develop-{0}', github.sha) || format('integration-tests-{0}', github.ref) }} cancel-in-progress: true diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 4e4a534caf..dfa7522e75 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -18,6 +18,7 @@ jobs: ktlint: name: Kotlin Linter runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/main' && format('klint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('klint-develop-{0}', github.sha) || format('klint-{0}', github.ref) }} cancel-in-progress: true @@ -90,6 +91,7 @@ jobs: android-lint: name: Android Linter runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/main' && format('android-lint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('android-lint-develop-{0}', github.sha) || format('android-lint-{0}', github.ref) }} cancel-in-progress: true @@ -122,6 +124,7 @@ jobs: fail-fast: false matrix: target: [ Gplay, Fdroid ] + # Allow all jobs on develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/develop' && format('apk-lint-develop-{0}', github.sha) || format('apk-lint-{0}-{1}', matrix.target, github.ref) }} cancel-in-progress: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 143da2f5ae..9c7aefc336 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,6 +14,7 @@ jobs: unit-tests: name: Run Unit Tests runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. concurrency: group: ${{ github.ref == 'refs/heads/main' && format('unit-test-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-test-develop-{0}', github.sha) || format('unit-test-{0}', github.ref) }} cancel-in-progress: true