Skip to content

Commit

Permalink
feat(repo): use yarn for macos tests
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Apr 25, 2023
1 parent a37129d commit e69d738
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ jobs:
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
SELECTED_PM: 'npm' # use the previous runner
SELECTED_PM: 'npm' # explicitly define npm for macOS tests
NODE_OPTIONS: --max_old_space_size=8192
steps:
- run:
name: Set dynamic nx run variable
Expand Down
3 changes: 3 additions & 0 deletions e2e/expo/src/expo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import {
checkFilesExist,
cleanupProject,
expectTestsPass,
getSelectedPackageManager,
killPorts,
newProject,
packageInstall,
promisifiedTreeKill,
readJson,
readResolvedConfiguration,
Expand All @@ -22,6 +24,7 @@ describe('expo', () => {

beforeAll(() => {
proj = newProject();
packageInstall('react-native', null, '0.71.6'); // expo requires react-native 0.71.6
runCLI(`generate @nx/expo:application ${appName} --no-interactive`);
runCLI(
`generate @nx/expo:library ${libName} --buildable --publishable --importPath=${proj}/${libName}`
Expand Down
19 changes: 7 additions & 12 deletions e2e/utils/create-project-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,15 @@ export function packageInstall(

const command = `${
mode === 'dev' ? pm.addDev : pm.addProd
} ${pkgsWithVersions}${isVerbose() ? ' --verbose' : ''}`;
} ${pkgsWithVersions}`;

try {
const install = execSync(
`${mode === 'dev' ? pm.addDev : pm.addProd} ${pkgsWithVersions}${
isVerbose() ? ' --verbose' : ''
}`,
{
cwd,
stdio: 'pipe',
env: process.env,
encoding: 'utf-8',
}
);
const install = execSync(command, {
cwd,
stdio: isVerbose() ? 'inherit' : 'ignore',
env: process.env,
encoding: 'utf-8',
});

if (isVerbose()) {
output.log({
Expand Down

0 comments on commit e69d738

Please sign in to comment.