Skip to content

Commit 2a436b8

Browse files
authored
[CI Energy Waste] Deduplicate static checks in CI workflow (#15739)
1 parent 4d57381 commit 2a436b8

File tree

2 files changed

+6
-36
lines changed

2 files changed

+6
-36
lines changed

.github/workflows/nodejs.yml

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ jobs:
5656
- name: Run tests depending on type information
5757
run: yarn test-with-type-info
5858

59-
typecheck:
60-
name: Typecheck Examples and Tests
59+
static-checks:
60+
name: Static Checks (Lint, Typecheck, Yarn Validate)
6161
runs-on: ubuntu-latest
6262
needs: prepare-yarn-cache-ubuntu
6363

@@ -71,30 +71,14 @@ jobs:
7171
cache: yarn
7272
- name: install
7373
run: yarn --immutable
74-
- name: build
74+
- name: build TypeScript
7575
run: yarn build:ts
76+
- name: build JavaScript
77+
run: yarn build:js
7678
- name: typecheck examples
7779
run: yarn typecheck:examples
7880
- name: typecheck tests
7981
run: yarn typecheck:tests
80-
81-
lint:
82-
name: Lint
83-
runs-on: ubuntu-latest
84-
needs: prepare-yarn-cache-ubuntu
85-
86-
steps:
87-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88-
with:
89-
persist-credentials: false
90-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
91-
with:
92-
node-version: lts/*
93-
cache: yarn
94-
- name: install
95-
run: yarn --immutable
96-
- name: build
97-
run: yarn build:js
9882
- name: verify Yarn PnP compatibility
9983
run: yarn verify-pnp
10084
- name: run eslint
@@ -105,21 +89,6 @@ jobs:
10589
run: yarn check-changelog
10690
- name: check copyright headers
10791
run: yarn check-copyright-headers
108-
109-
yarn-validate:
110-
name: Validate Yarn dependencies and constraints
111-
runs-on: ubuntu-latest
112-
needs: prepare-yarn-cache-ubuntu
113-
steps:
114-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
115-
with:
116-
persist-credentials: false
117-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
118-
with:
119-
node-version: lts/*
120-
cache: yarn
121-
- name: install
122-
run: yarn --immutable
12392
- name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")'
12493
run: yarn constraints
12594
- name: 'Check for duplicate dependencies (fix w/ "yarn dedupe")'

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Fixes
88

99
- `[expect]` Fix `bigint` error ([#15702](https://github.com/jestjs/jest/pull/15702))
10+
- `[ci]` Deduplicate static checks in CI workflow by combining typecheck, lint, and yarn-validate jobs
1011

1112
## 30.0.4
1213

0 commit comments

Comments
 (0)