Skip to content
Merged
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
12 changes: 8 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30403,15 +30403,19 @@ module.exports = defineConfig({
core.info(` Wrote ${safeFileName}: ${script.name}`);
}
// Install Playwright
core.info('Installing Playwright...');
// Pin version to avoid surprises from `latest` and skip --with-deps
// (Ubuntu 24.04 GitHub runners already have all required system libraries,
// and --with-deps invokes apt-get which can hang waiting for sudo).
core.info('Installing @playwright/test...');
const packageJson = JSON.stringify({
dependencies: {
'@playwright/test': 'latest',
'@playwright/test': '1.49.0',
},
});
fs.writeFileSync(path.join(tmpDir, 'package.json'), packageJson);
await (0, exec_1.exec)('npm', ['install', '--no-audit', '--no-fund'], { cwd: tmpDir, silent: true });
await (0, exec_1.exec)('npx', ['playwright', 'install', '--with-deps', inputs.browser], { cwd: tmpDir, silent: true });
await (0, exec_1.exec)('npm', ['install', '--no-audit', '--no-fund'], { cwd: tmpDir });
core.info(`Installing Playwright browser: ${inputs.browser}...`);
await (0, exec_1.exec)('npx', ['playwright', 'install', inputs.browser], { cwd: tmpDir });
// Run tests
core.info('Running Playwright tests...');
const startTime = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "qualitymax-github-action",
"version": "1.2.0",
"version": "1.2.1",
"description": "Run AI-powered E2E tests in your CI/CD pipeline with QualityMax",
"main": "dist/index.js",
"scripts": {
Expand Down
13 changes: 9 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
TriggerTestsResponse,
TestExecutionResults,
EmbeddedScript,
SeedTestsResponse,

Check failure on line 22 in src/index.ts

View workflow job for this annotation

GitHub Actions / lint

'SeedTestsResponse' is defined but never used
} from './types';

/**
Expand Down Expand Up @@ -229,16 +229,21 @@
}

// Install Playwright
core.info('Installing Playwright...');
// Pin version to avoid surprises from `latest` and skip --with-deps
// (Ubuntu 24.04 GitHub runners already have all required system libraries,
// and --with-deps invokes apt-get which can hang waiting for sudo).
core.info('Installing @playwright/test...');
const packageJson = JSON.stringify({
dependencies: {
'@playwright/test': 'latest',
'@playwright/test': '1.49.0',
},
});
fs.writeFileSync(path.join(tmpDir, 'package.json'), packageJson);

await exec('npm', ['install', '--no-audit', '--no-fund'], { cwd: tmpDir, silent: true });
await exec('npx', ['playwright', 'install', '--with-deps', inputs.browser], { cwd: tmpDir, silent: true });
await exec('npm', ['install', '--no-audit', '--no-fund'], { cwd: tmpDir });

core.info(`Installing Playwright browser: ${inputs.browser}...`);
await exec('npx', ['playwright', 'install', inputs.browser], { cwd: tmpDir });

// Run tests
core.info('Running Playwright tests...');
Expand All @@ -259,7 +264,7 @@
// Parse results from JSON reporter
let passedTests = 0;
let failedTests = 0;
let totalTests = scripts.length;

Check failure on line 267 in src/index.ts

View workflow job for this annotation

GitHub Actions / lint

'totalTests' is never reassigned. Use 'const' instead
let skippedTests = 0;
const testResults: TestExecutionResults['tests'] = [];

Expand Down
Loading