Skip to content

Commit b45b3b2

Browse files
committed
ci: Add comprehensive quality checks to PR and develop workflows
- Add build verification to pr.yaml (parallel with lint and test) - Update deploy-to-dev.yaml to run lint, test, build before Docker build - Use shared install job with yarn cache to optimize CI performance PR workflow: install → (lint + test + build) in parallel Develop workflow: install → (lint + test + build-check) → docker-build → deploy This ensures all code is linted, tested, and builds successfully before deployment to dev environment.
1 parent c6c2d4c commit b45b3b2

File tree

2 files changed

+109
-1
lines changed

2 files changed

+109
-1
lines changed

.github/workflows/deploy-to-dev.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,96 @@ env:
1818
TEST_PROMO_PR_BRANCH: promotion/test-pr
1919

2020
jobs:
21+
install:
22+
name: Install Dependencies
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
node-version: [22.x]
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Enable Corepack
32+
run: corepack enable
33+
34+
- name: Setup node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
cache: "yarn"
39+
- run: yarn install --immutable
40+
41+
lint:
42+
name: Lint
43+
runs-on: ubuntu-latest
44+
needs: install
45+
strategy:
46+
matrix:
47+
node-version: [22.x]
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
52+
- name: Enable Corepack
53+
run: corepack enable
54+
55+
- name: Setup node
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: ${{ matrix.node-version }}
59+
cache: "yarn"
60+
- run: yarn install --immutable
61+
- run: yarn lint
62+
63+
test:
64+
name: Test
65+
runs-on: ubuntu-latest
66+
needs: install
67+
strategy:
68+
matrix:
69+
node-version: [22.x]
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
74+
- name: Enable Corepack
75+
run: corepack enable
76+
77+
- name: Setup node
78+
uses: actions/setup-node@v4
79+
with:
80+
node-version: ${{ matrix.node-version }}
81+
cache: "yarn"
82+
- run: yarn install --immutable
83+
- run: yarn test-ci
84+
85+
build-check:
86+
name: Build Verification
87+
runs-on: ubuntu-latest
88+
needs: install
89+
strategy:
90+
matrix:
91+
node-version: [22.x]
92+
steps:
93+
- name: Checkout
94+
uses: actions/checkout@v4
95+
96+
- name: Enable Corepack
97+
run: corepack enable
98+
99+
- name: Setup node
100+
uses: actions/setup-node@v4
101+
with:
102+
node-version: ${{ matrix.node-version }}
103+
cache: "yarn"
104+
- run: yarn install --immutable
105+
- run: yarn build
106+
21107
build:
22108
name: Build and Push Image
23109
runs-on: ubuntu-latest
110+
needs: [lint, test, build-check]
24111
outputs:
25112
SHORT_SHA: ${{ steps.short-sha.outputs.SHA }}
26113
steps:

.github/workflows/pr.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,26 @@ jobs:
7272
node-version: ${{ matrix.node-version }}
7373
cache: "yarn"
7474
- run: yarn install --immutable
75-
7675
- run: yarn test-ci
76+
77+
build:
78+
name: Build
79+
runs-on: ubuntu-latest
80+
needs: install
81+
strategy:
82+
matrix:
83+
node-version: [22.x]
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@v4
87+
88+
- name: Enable Corepack
89+
run: corepack enable
90+
91+
- name: Setup node
92+
uses: actions/setup-node@v4
93+
with:
94+
node-version: ${{ matrix.node-version }}
95+
cache: "yarn"
96+
- run: yarn install --immutable
97+
- run: yarn build

0 commit comments

Comments
 (0)