diff --git a/.github/workflows/fe-e2e.yml b/.github/workflows/fe-e2e.yml index 0a8e2d7f..4d3ab1cf 100644 --- a/.github/workflows/fe-e2e.yml +++ b/.github/workflows/fe-e2e.yml @@ -36,8 +36,12 @@ jobs: id: npm-cache uses: actions/cache@v4 with: - path: '**/node_modules' + path: | + **/node_modules + !/home/runner/.cache/Cypress key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-modules- - name: Install Cypress Binary run: npx cypress install diff --git a/tools/scripts/artifacts/nx-project.ts b/tools/scripts/artifacts/nx-project.ts index e4d641bb..1ae60cc7 100644 --- a/tools/scripts/artifacts/nx-project.ts +++ b/tools/scripts/artifacts/nx-project.ts @@ -123,7 +123,7 @@ export class NxProject { public build() { console.log( execSync( - `./node_modules/.bin/nx build ${this.name} --prod ${ + `npx nx build ${this.name} --prod ${ this.nxProjectKind === NxProjectKind.Application && this.task !== TASK.RELEASE ? '--sourceMap=true' diff --git a/tools/scripts/artifacts/utils.ts b/tools/scripts/artifacts/utils.ts index 937f4a79..65ec5809 100644 --- a/tools/scripts/artifacts/utils.ts +++ b/tools/scripts/artifacts/utils.ts @@ -116,7 +116,7 @@ export class Utils { base?: string, target?: string ): string[] { - let cmd = `./node_modules/.bin/nx show projects --affected=${affected} `; + let cmd = `npx nx show projects --affected=${affected} `; if (base) { cmd = cmd.concat(`--base=${base} `); } diff --git a/tools/scripts/run-many/run-many.ts b/tools/scripts/run-many/run-many.ts index 95eeeb73..3df51e7f 100644 --- a/tools/scripts/run-many/run-many.ts +++ b/tools/scripts/run-many/run-many.ts @@ -45,7 +45,7 @@ function main() { const projects = getAffectedProjects(target, jobIndex, jobCount, base, ref); - const runManyProjectsCmd = `./node_modules/.bin/nx run-many --targets=${target} --projects=${projects}`; + const runManyProjectsCmd = `npx nx run-many --targets=${target} --projects=${projects}`; let cmd = `${runManyProjectsCmd} --parallel=false --prod`; if (target.includes('e2e')) {