@samitouri / QOS-React / commits / 6cf8518505

[ci] Specify limited concurrency for PR jobs (#31240)

There was a concurrency setting we hadn't enabled on jobs that are primarily triggered for PRs. This meant that every update to the PR would trigger new CI jobs without canceling any ones already in flight, which can greatly slow down CI due to the number of jobs that need to run. This PR adds concurrency [based on the workflow name and PR number or head ref.](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs) --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31240). * __->__ #31240 * #31239

lauren committed Oct 14, 2024 at 12:07 UTC 6cf8518505b198c58c950976174b1642760d48ee
5 files changed +20
.github/workflows/compiler_playground.yml
+4
@@ -8,6 +8,10 @@ on:
8 - compiler/**
9 - .github/workflows/compiler-playground.yml
10
11 +concurrency:
12 + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
13 + cancel-in-progress: true
14 +
15 env:
16 TZ: /usr/share/zoneinfo/America/Los_Angeles
17 # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
.github/workflows/compiler_rust.yml
+4
@@ -15,6 +15,10 @@ on:
15 - compiler/Cargo.*
16 - compiler/*.toml
17
18 +concurrency:
19 + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
20 + cancel-in-progress: true
21 +
22 env:
23 CARGO_TERM_COLOR: always
24 RUSTFLAGS: -Dwarnings
.github/workflows/compiler_typescript.yml
+4
@@ -8,6 +8,10 @@ on:
8 - compiler/**
9 - .github/workflows/compiler_typescript.yml
10
11 +concurrency:
12 + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
13 + cancel-in-progress: true
14 +
15 env:
16 TZ: /usr/share/zoneinfo/America/Los_Angeles
17 # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
.github/workflows/runtime_build_and_test.yml
+4
@@ -7,6 +7,10 @@ on:
7 paths-ignore:
8 - compiler/**
9
10 +concurrency:
11 + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
12 + cancel-in-progress: true
13 +
14 env:
15 TZ: /usr/share/zoneinfo/America/Los_Angeles
16 # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
.github/workflows/shared_lint.yml
+4
@@ -5,6 +5,10 @@ on:
5 branches: [main]
6 pull_request:
7
8 +concurrency:
9 + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
10 + cancel-in-progress: true
11 +
12 env:
13 TZ: /usr/share/zoneinfo/America/Los_Angeles
14 # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout