Skip to content

Commit a96e78b

Browse files
committed
ci(napi): NAPI tests skip Babel + Prettier submodules (#12752)
Cloning submodules takes a bit of time. Skip cloning `babel` and `prettier` repos in NAPI tests, because they doesn't need them. NAPI parser tests only need the other 3 submodules.
1 parent 0ec214b commit a96e78b

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/actions/clone-submodules/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,74 @@ name: Clone submodules
22

33
description: Clone submodules
44

5+
inputs:
6+
test262:
7+
default: true
8+
required: false
9+
type: boolean
10+
description: Whether to clone test262 submodule
11+
12+
babel:
13+
default: true
14+
required: false
15+
type: boolean
16+
description: Whether to clone babel submodule
17+
18+
typescript:
19+
default: true
20+
required: false
21+
type: boolean
22+
description: Whether to clone typescript submodule
23+
24+
prettier:
25+
default: true
26+
required: false
27+
type: boolean
28+
description: Whether to clone prettier submodule
29+
30+
acorn-test262:
31+
default: true
32+
required: false
33+
type: boolean
34+
description: Whether to clone acorn-test262 submodule
35+
536
runs:
637
using: composite
738
steps:
839
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40+
if: ${{ inputs.test262 == 'true' }}
941
with:
1042
show-progress: false
1143
repository: tc39/test262
1244
path: tasks/coverage/test262
1345
ref: 4b5d36ab6ef2f59d0a8902cd383762547a3a74c4
1446

1547
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48+
if: ${{ inputs.babel == 'true' }}
1649
with:
1750
show-progress: false
1851
repository: babel/babel
1952
path: tasks/coverage/babel
2053
ref: 1d4546bcb80009303aab386b59f4df1fd335c1d5
2154

2255
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+
if: ${{ inputs.typescript == 'true' }}
2357
with:
2458
show-progress: false
2559
repository: microsoft/TypeScript
2660
path: tasks/coverage/typescript
2761
ref: 81c951894e93bdc37c6916f18adcd80de76679bc
2862

2963
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64+
if: ${{ inputs.prettier == 'true' }}
3065
with:
3166
show-progress: false
3267
repository: prettier/prettier
3368
path: tasks/prettier_conformance/prettier
3469
ref: 7584432401a47a26943dd7a9ca9a8e032ead7285 # v3.5.0
3570

3671
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
if: ${{ inputs.acorn-test262 == 'true' }}
3773
with:
3874
show-progress: false
3975
repository: oxc-project/acorn-test262

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ jobs:
151151
- '!editors/**'
152152
- uses: ./.github/actions/clone-submodules
153153
if: steps.filter.outputs.src == 'true'
154+
with:
155+
babel: false
156+
prettier: false
154157
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
155158
if: steps.filter.outputs.src == 'true'
156159
with:

0 commit comments

Comments
 (0)