Skip to content

Commit cb29bb7

Browse files
authored
feat: Add concurrency controls and consistent formatting to CI workflows (#400)
- Short circuit CI when new pushes are made to the same pull request - Fixed formatting between steps
1 parent ef927c2 commit cb29bb7

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

.github/workflows/agent-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8+
9+
concurrency:
10+
group: agent-release
11+
cancel-in-progress: false
12+
813
jobs:
914
check-package-version:
1015
name: Check package version and detect an update

.github/workflows/build.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: Build
22

33
on:
44
pull_request:
5-
push:
6-
branches:
7-
- main
5+
6+
concurrency:
7+
group: build-${{ github.head_ref || github.ref }}
8+
cancel-in-progress: true
89

910
jobs:
1011
build:
@@ -16,19 +17,24 @@ jobs:
1617
uses: actions/checkout@v5
1718
with:
1819
persist-credentials: false
20+
1921
- name: Setup pnpm
2022
uses: pnpm/action-setup@v4
21-
23+
2224
- name: Setup Node.js
2325
uses: actions/setup-node@v4
2426
with:
2527
node-version: 22
26-
cache: 'pnpm'
28+
cache: "pnpm"
29+
2730
- name: Install dependencies
2831
run: pnpm install --frozen-lockfile
32+
2933
- name: Build electron-trpc
3034
run: pnpm --filter @posthog/electron-trpc build
35+
3136
- name: Build agent
3237
run: pnpm --filter agent build
38+
3339
- name: Build array
3440
run: pnpm --filter array build

.github/workflows/code-quality.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Code quality
33
on:
44
pull_request:
55

6+
concurrency:
7+
group: code-quality-${{ github.head_ref || github.ref }}
8+
cancel-in-progress: true
9+
610
jobs:
711
quality:
812
runs-on: ubuntu-latest
@@ -13,7 +17,9 @@ jobs:
1317
uses: actions/checkout@v5
1418
with:
1519
persist-credentials: false
20+
1621
- name: Setup Biome
1722
uses: biomejs/setup-biome@v2
23+
1824
- name: Run Biome
19-
run: biome ci .
25+
run: biome ci .

.github/workflows/typecheck.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Typecheck
33
on:
44
pull_request:
55

6+
concurrency:
7+
group: typecheck-${{ github.head_ref || github.ref }}
8+
cancel-in-progress: true
9+
610
jobs:
711
typecheck:
812
runs-on: ubuntu-latest
@@ -13,14 +17,18 @@ jobs:
1317
uses: actions/checkout@v5
1418
with:
1519
persist-credentials: false
20+
1621
- name: Setup pnpm
1722
uses: pnpm/action-setup@v4
23+
1824
- name: Setup Node.js
1925
uses: actions/setup-node@v4
2026
with:
2127
node-version: 22
2228
cache: "pnpm"
29+
2330
- name: Install dependencies
2431
run: pnpm install --frozen-lockfile
32+
2533
- name: Run type check
2634
run: pnpm run typecheck

0 commit comments

Comments
 (0)