Skip to content

Commit 735fb5c

Browse files
committed
refactor: update setup script to run install
1 parent 7cb5bb0 commit 735fb5c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ jobs:
7474
key: ${{ runner.os }}-turbo-${{ github.sha }}
7575
restore-keys: |
7676
${{ runner.os }}-turbo-
77-
- if: ${{ matrix.react-version == 'react-19' }}
78-
run: node script/setup-react-19.mts
7977
- name: Install dependencies
8078
run: npm ci
79+
- if: ${{ matrix.react-version == 'react-19' }}
80+
run: node script/setup-react-19.mts
8181
- name: Build
8282
run: npm run build
8383
- name: Run tests defined in vitest
@@ -106,10 +106,10 @@ jobs:
106106
key: ${{ runner.os }}-turbo-${{ github.sha }}
107107
restore-keys: |
108108
${{ runner.os }}-turbo-
109-
- if: ${{ matrix.react-version == 'react-19' }}
110-
run: node script/setup-react-19.mts
111109
- name: Install dependencies
112110
run: npm ci
111+
- if: ${{ matrix.react-version == 'react-19' }}
112+
run: node script/setup-react-19.mts
113113
- name: Build project
114114
run: npm run build
115115
- name: Type check
@@ -136,10 +136,10 @@ jobs:
136136
key: ${{ runner.os }}-turbo-${{ github.sha }}
137137
restore-keys: |
138138
${{ runner.os }}-turbo-
139-
- if: ${{ matrix.react-version == 'react-19' }}
140-
run: node script/setup-react-19.mts
141139
- name: Install dependencies
142140
run: npm ci
141+
- if: ${{ matrix.react-version == 'react-19' }}
142+
run: node script/setup-react-19.mts
143143
- name: Build
144144
run: npx turbo build
145145

script/setup-react-19.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {execSync} from 'node:child_process'
12
import fs from 'node:fs'
23
import glob from 'fast-glob'
34
import semver from 'semver'
@@ -41,3 +42,5 @@ for (const packageJsonPath of packageJsonPaths) {
4142

4243
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf8')
4344
}
45+
46+
execSync('npm install', {stdio: 'inherit'})

0 commit comments

Comments
 (0)