Skip to content

Commit b43896e

Browse files
authored
Split CI jobs (#376)
* Split CI job * Fix concurrency issue
1 parent f6f5c42 commit b43896e

File tree

3 files changed

+71
-57
lines changed

3 files changed

+71
-57
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
- master
77
- master-next
88

9-
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
12-
139
env:
1410
node-version: '22.x'
1511

@@ -44,62 +40,11 @@ jobs:
4440
cat $GITHUB_OUTPUT
4541
4642
typescript-resolver-files:
47-
strategy:
48-
matrix:
49-
os: [ubuntu-22.04, windows-latest]
50-
node-version: [18.x, 20.x, 22.x]
51-
runs-on: ${{ matrix.os }}
5243
needs: precheck
5344
if: ${{ needs.precheck.outputs.affected-typescript-resolver-files == 'true' }}
54-
steps:
55-
- name: Check out repository
56-
uses: actions/checkout@v4
57-
58-
- name: Set up Node.js ${{ matrix.node-version }}
59-
uses: actions/setup-node@v4
60-
with:
61-
node-version: ${{ matrix.node-version }}
62-
cache: yarn
63-
cache-dependency-path: '**/yarn.lock'
64-
65-
- name: Install deps
66-
run: yarn install --prefer-offline
67-
68-
- name: Lint
69-
run: yarn nx lint typescript-resolver-files
70-
71-
- name: Test
72-
run: yarn nx test typescript-resolver-files
73-
74-
- name: Build
75-
run: yarn nx build typescript-resolver-files
45+
uses: ./.github/workflows/typescript-resolver-files.yml
7646

7747
typescript-resolver-files-e2e:
78-
strategy:
79-
matrix:
80-
os: [ubuntu-22.04, windows-latest]
81-
node-version: [18.x, 20.x, 22.x]
82-
runs-on: ${{ matrix.os }}
83-
defaults:
84-
run:
85-
shell: bash
8648
needs: precheck
8749
if: ${{ needs.precheck.outputs.affected-typescript-resolver-files == 'true' || needs.precheck.outputs.affected-typescript-resolver-files-e2e == 'true' }}
88-
steps:
89-
- name: Check out repository
90-
uses: actions/checkout@v4
91-
with:
92-
fetch-depth: 0
93-
94-
- name: Set up Node.js ${{ matrix.node-version }}
95-
uses: actions/setup-node@v4
96-
with:
97-
node-version: ${{ matrix.node-version }}
98-
cache: yarn
99-
cache-dependency-path: '**/yarn.lock'
100-
101-
- name: Install deps
102-
run: yarn install --prefer-offline
103-
104-
- name: e2e
105-
run: yarn nx e2e typescript-resolver-files-e2e
50+
uses: ./.github/workflows/typescript-resolver-files-e2e.yml
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
workflow_call:
3+
4+
env:
5+
node-version: '22.x'
6+
7+
jobs:
8+
typescript-resolver-files-e2e:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-22.04, windows-latest]
12+
node-version: [18.x, 20.x, 22.x]
13+
runs-on: ${{ matrix.os }}
14+
defaults:
15+
run:
16+
shell: bash
17+
steps:
18+
- name: Check out repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: yarn
28+
cache-dependency-path: '**/yarn.lock'
29+
30+
- name: Install deps
31+
run: yarn install --prefer-offline
32+
33+
- name: e2e
34+
run: yarn nx e2e typescript-resolver-files-e2e
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
workflow_call:
3+
4+
env:
5+
node-version: '22.x'
6+
7+
jobs:
8+
typescript-resolver-files:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-22.04, windows-latest]
12+
node-version: [18.x, 20.x, 22.x]
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: yarn
23+
cache-dependency-path: '**/yarn.lock'
24+
25+
- name: Install deps
26+
run: yarn install --prefer-offline
27+
28+
- name: Lint
29+
run: yarn nx lint typescript-resolver-files
30+
31+
- name: Test
32+
run: yarn nx test typescript-resolver-files
33+
34+
- name: Build
35+
run: yarn nx build typescript-resolver-files

0 commit comments

Comments
 (0)