-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathcurrents.config.ts
More file actions
57 lines (50 loc) · 1.75 KB
/
currents.config.ts
File metadata and controls
57 lines (50 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* Currents.dev configuration for Playwright test reporting
*
* This configuration integrates with the existing Playwright setup
* and provides enhanced test result reporting and analytics.
*
* Note: When using @currents/playwright, most configuration is handled
* through environment variables and the reporter itself.
*
* @see https://currents.dev/readme/integration-with-playwright/currents-playwright
*/
export const currentsConfig = {
// Project configuration - these are the main settings needed
projectId: process.env.CURRENTS_PROJECT_ID,
recordKey: process.env.CURRENTS_RECORD_KEY,
// Build configuration for better organization
ciBuildId: process.env.CURRENTS_CI_BUILD_ID || `local-${Date.now()}`,
// Coverage configuration
coverage: {
projects: [process.env.PROJECT || 'live chromium'], // Dynamic project based on environment
dir: './coverage', // Directory to store coverage reports
},
// Test result metadata for better organization
tags: {
// Add Git information to test results
branch: process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME,
commit: process.env.GITHUB_SHA,
author: process.env.GITHUB_ACTOR,
// Environment information
environment: process.env.NODE_ENV || 'test',
platform: process.env.PLATFORM_SERVER || 'localhost',
// Build information
buildNumber: process.env.GITHUB_RUN_NUMBER,
workflow: process.env.GITHUB_WORKFLOW,
},
// Integration settings
integration: {
slack: {
enabled: !!process.env.SLACK_WEBHOOK_URL,
webhook: process.env.SLACK_WEBHOOK_URL,
onlyOnFailure: true,
},
github: {
enabled: !!process.env.GITHUB_TOKEN,
token: process.env.GITHUB_TOKEN,
prComments: true,
commitStatus: true,
},
},
};