forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
… CI using concurrency (oppia#5466) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fix oppia#2711 Fixes part of oppia#5343 ### Project [PR 2.5 of Project 4.1] ### Changes Made - The existing workflow canceller utilized the [cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) by syfle. - Since GitHub introduced native [concurrency](https://docs.github.com/en/actions/using-jobs/using-concurrency) support on April 19, 2021, we can now utilize this built-in feature for better integration. - This implementation leverages the [concurrency property](https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-and-the-default-behavior) to manage workflows, using the configuration: ``` concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true ``` - This setup groups workflows by their name and reference, allowing GitHub to automatically cancel any in-progress jobs in the workflow when a new workflow run is triggered. - This retires the existing Automatic workflow canceller (workflow_canceller.yml). - This approach is now in place for the following workflows: - Build Tests - Static Checks - Unit Tests (Robolectric - Gradle) - Unit Tests (Robolectric - Bazel) ### Triggered Cancellation (PR Check Triggers) -> https://github.com/oppia/oppia-android/pull/5466/checks ### Screenshots of workflow cancelled **Workflows Running:** ![Screenshot (1536)](https://github.com/user-attachments/assets/fa11a887-0bee-4d6c-8c58-fa2e723bde91) **Workflows in previous run cancelling after latest commit** ![Screenshot (1538)](https://github.com/user-attachments/assets/14d96ff7-38c6-4054-a084-7712c34b9c29) **Note:** It is observed that the Non-App Module runs take a bit of time to cancel but they eventually get cancelled. ![image](https://github.com/user-attachments/assets/516628ee-15a0-4a95-926c-ea925357bae2) ![image](https://github.com/user-attachments/assets/03a74685-c458-44a8-ada9-09faf45eeb93) ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).
- Loading branch information
Showing
5 changed files
with
69 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.