Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: spit out node path #302

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ jobs:
gsutil cp ./cypress-macos-amd64.zip gs://${{ secrets.GCS_RUNNER_BUCKET }}/cypress-macos-amd64-${{ github.run_id }}.zip

bundle-test:
if: false
needs: [build-windows-bundle, build-mac-bundle]
strategy:
max-parallel: 3
Expand Down Expand Up @@ -212,6 +213,7 @@ jobs:
--select-suite "Cypress - ${{ matrix.os }} - ${{ matrix.browser }}"

bundle-tests-with-sc:
if: false
needs: [build-windows-bundle, build-mac-bundle]
strategy:
max-parallel: 3
Expand Down Expand Up @@ -272,6 +274,7 @@ jobs:
--tunnel-name github-cypress-sc-check-tunnel-${{ matrix.os }}-${{ matrix.browser }}

bundle-test-modules:
if: false
needs: [build-windows-bundle, build-mac-bundle]
strategy:
max-parallel: 2
Expand Down
13 changes: 8 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"lodash": "4.17.21",
"mkdirp": "^3.0.1",
"playwright-webkit": "1.45.2",
"sauce-testrunner-utils": "3.0.0",
"sauce-testrunner-utils": "3.0.3-beta.1.0",
"typescript": "5.5.3",
"webpack": "5.93.0",
"xml-js": "^1.6.11",
Expand Down
11 changes: 11 additions & 0 deletions src/cypress-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}

// Configure reporters
function configureReporters(runCfg: RunConfig, opts: any) {

Check warning on line 64 in src/cypress-runner.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
const reporterConfig = {
reporterEnabled: `spec`,
};
Expand Down Expand Up @@ -273,6 +273,14 @@
);
const nodeCtx = { nodePath: nodeBin, npmPath: npmBin };

if (
nodeBin.startsWith('/Volumes/Sauce/node/') ||
nodeBin.startsWith('D:\\node\\')
) {
nodeCtx.nodePath = 'node';
nodeCtx.npmPath = 'npm';
}

await prepareNpmEnv(runCfg, nodeCtx);
const cypressOpts = getCypressOpts(runCfg, suiteName);
const suites = runCfg.suites || [];
Expand Down Expand Up @@ -311,13 +319,16 @@
// For dev and test purposes, this allows us to run our Cypress Runner from command line
if (require.main === module) {
const packageInfo = require(path.join(__dirname, '..', 'package.json'));
console.log(`PATH: ${process.env.PATH}`);
console.log(`Sauce Cypress Runner ${packageInfo.version}`);
console.log(`Running Cypress ${packageInfo.dependencies?.cypress || ''}`);

const { nodeBin, runCfgPath, suiteName } = getArgs();
const timeoutSec = 1800; // 30 min
const preExecTimeoutSec = 300; // 5 min

console.log(`Node: ${nodeBin}`);

cypressRunner(nodeBin, runCfgPath, suiteName, timeoutSec, preExecTimeoutSec)
.then((passed) => process.exit(passed ? 0 : 1))
.catch((err) => {
Expand Down
Loading