apify-test-tools 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/lib/lib.ts +3 -0
  2. package/package.json +1 -1
  3. package/dist/bin/build.d.ts +0 -18
  4. package/dist/bin/build.d.ts.map +0 -1
  5. package/dist/bin/build.js +0 -229
  6. package/dist/bin/build.js.map +0 -1
  7. package/dist/bin/consts.d.ts +0 -4
  8. package/dist/bin/consts.d.ts.map +0 -1
  9. package/dist/bin/consts.js +0 -6
  10. package/dist/bin/consts.js.map +0 -1
  11. package/dist/bin/git.d.ts +0 -14
  12. package/dist/bin/git.d.ts.map +0 -1
  13. package/dist/bin/git.js +0 -43
  14. package/dist/bin/git.js.map +0 -1
  15. package/dist/bin/github.d.ts +0 -13
  16. package/dist/bin/github.d.ts.map +0 -1
  17. package/dist/bin/github.js +0 -59
  18. package/dist/bin/github.js.map +0 -1
  19. package/dist/bin/main.d.ts +0 -3
  20. package/dist/bin/main.d.ts.map +0 -1
  21. package/dist/bin/main.js +0 -124
  22. package/dist/bin/main.js.map +0 -1
  23. package/dist/bin/slack.d.ts +0 -13
  24. package/dist/bin/slack.d.ts.map +0 -1
  25. package/dist/bin/slack.js +0 -51
  26. package/dist/bin/slack.js.map +0 -1
  27. package/dist/bin/test-report.d.ts +0 -10
  28. package/dist/bin/test-report.d.ts.map +0 -1
  29. package/dist/bin/test-report.js +0 -74
  30. package/dist/bin/test-report.js.map +0 -1
  31. package/dist/bin/types.d.ts +0 -89
  32. package/dist/bin/types.d.ts.map +0 -1
  33. package/dist/bin/types.js +0 -2
  34. package/dist/bin/types.js.map +0 -1
  35. package/dist/bin/utils.d.ts +0 -29
  36. package/dist/bin/utils.d.ts.map +0 -1
  37. package/dist/bin/utils.js +0 -169
  38. package/dist/bin/utils.js.map +0 -1
  39. package/dist/index.d.ts +0 -3
  40. package/dist/index.d.ts.map +0 -1
  41. package/dist/index.js +0 -3
  42. package/dist/index.js.map +0 -1
  43. package/dist/lib/consts.d.ts +0 -3
  44. package/dist/lib/consts.d.ts.map +0 -1
  45. package/dist/lib/consts.js +0 -12
  46. package/dist/lib/consts.js.map +0 -1
  47. package/dist/lib/extend-expect.d.ts +0 -3
  48. package/dist/lib/extend-expect.d.ts.map +0 -1
  49. package/dist/lib/extend-expect.js +0 -257
  50. package/dist/lib/extend-expect.js.map +0 -1
  51. package/dist/lib/lib.d.ts +0 -38
  52. package/dist/lib/lib.d.ts.map +0 -1
  53. package/dist/lib/lib.js +0 -215
  54. package/dist/lib/lib.js.map +0 -1
  55. package/dist/lib/run-test-result.d.ts +0 -22
  56. package/dist/lib/run-test-result.d.ts.map +0 -1
  57. package/dist/lib/run-test-result.js +0 -73
  58. package/dist/lib/run-test-result.js.map +0 -1
  59. package/dist/lib/types.d.ts +0 -127
  60. package/dist/lib/types.d.ts.map +0 -1
  61. package/dist/lib/types.js +0 -2
  62. package/dist/lib/types.js.map +0 -1
  63. package/dist/lib/utils.d.ts +0 -8
  64. package/dist/lib/utils.d.ts.map +0 -1
  65. package/dist/lib/utils.js +0 -33
  66. package/dist/lib/utils.js.map +0 -1
  67. package/dist/test/unit/bin/git.test.d.ts +0 -2
  68. package/dist/test/unit/bin/git.test.d.ts.map +0 -1
  69. package/dist/test/unit/bin/git.test.js +0 -81
  70. package/dist/test/unit/bin/git.test.js.map +0 -1
  71. package/dist/test/unit/custom-matchers.test.d.ts +0 -2
  72. package/dist/test/unit/custom-matchers.test.d.ts.map +0 -1
  73. package/dist/test/unit/custom-matchers.test.js +0 -75
  74. package/dist/test/unit/custom-matchers.test.js.map +0 -1
  75. package/dist/test/unit/parse-commit.test.d.ts +0 -2
  76. package/dist/test/unit/parse-commit.test.d.ts.map +0 -1
  77. package/dist/test/unit/parse-commit.test.js +0 -57
  78. package/dist/test/unit/parse-commit.test.js.map +0 -1
  79. package/dist/test/unit/should-built-and-test.test.d.ts +0 -2
  80. package/dist/test/unit/should-built-and-test.test.d.ts.map +0 -1
  81. package/dist/test/unit/should-built-and-test.test.js +0 -136
  82. package/dist/test/unit/should-built-and-test.test.js.map +0 -1
  83. package/dist/test/unit/test-actor.test.d.ts +0 -2
  84. package/dist/test/unit/test-actor.test.d.ts.map +0 -1
  85. package/dist/test/unit/test-actor.test.js +0 -17
  86. package/dist/test/unit/test-actor.test.js.map +0 -1
  87. package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/bin/slack.js DELETED
@@ -1,51 +0,0 @@
1
- import { WebClient } from '@slack/web-api';
2
- import { getEnvVar } from './utils.js';
3
- export const notifyToSlack = async ({ changedFiles, commits, changelog, repository, dryRun, author, }) => {
4
- const slack = new WebClient(getEnvVar('SLACK_TOKEN_RELEASES_BOT'));
5
- if (!changelog) {
6
- console.warn('No new changelog entries found, did you forget to update it?');
7
- }
8
- let shortMessage = `${repository} --- New release (by ${author}):\n\n`;
9
- // This one is just for broader public that only cares about public facing changes
10
- if (changelog) {
11
- console.error(`=========================================`);
12
- shortMessage += `**Additions to the changelog**:\n\n${changelog}\n`;
13
- const channel = '#delivery-public-actors';
14
- console.error(`**Sending slack message to channel**: ${channel}.\n\n${shortMessage}`);
15
- console.error(`=========================================`);
16
- if (!dryRun) {
17
- await slack.chat.postMessage({
18
- channel,
19
- text: shortMessage,
20
- });
21
- }
22
- }
23
- const commitsMessage = `${commits
24
- .map(({ author, message }, index) => `${index + 1}. Commit message: ${message}\n\tAuthor: ${author}.`)
25
- .join('\n')}`;
26
- const changedFilesMessage = `**Files changed**: ${changedFiles.join(', ')}`;
27
- const longMessage = `${shortMessage}\n**Commit list**:\n${commitsMessage}\n\n${changedFilesMessage}`;
28
- // This one is for devs and project managers that need to know more details
29
- const notifChannel = `#notif-${repository.toLowerCase()}`;
30
- console.error(`=========================================`);
31
- console.error(`Sending slack message to channel: ${notifChannel}.\n\n${longMessage}`);
32
- console.error(`=========================================`);
33
- if (!dryRun) {
34
- await slack.chat.postMessage({
35
- text: longMessage,
36
- channel: notifChannel,
37
- });
38
- }
39
- };
40
- export const sendSlackMessage = async (channel, text, blocks, token) => {
41
- const slack = new WebClient(token);
42
- const { ts } = await slack.chat.postMessage({ text, channel });
43
- if (blocks.length > 0 && ts) {
44
- await slack.chat.postMessage({
45
- channel,
46
- thread_ts: ts,
47
- blocks: blocks.map((t) => ({ text: { type: 'mrkdwn', text: t }, type: 'section' })),
48
- });
49
- }
50
- };
51
- //# sourceMappingURL=slack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slack.js","sourceRoot":"","sources":["../../bin/slack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAWvC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,EAChC,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,GACa,EAAE,EAAE;IACvB,MAAM,KAAK,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAEnE,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;IACjF,CAAC;IAED,IAAI,YAAY,GAAG,GAAG,UAAU,wBAAwB,MAAM,QAAQ,CAAC;IAEvE,kFAAkF;IAClF,IAAI,SAAS,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC3D,YAAY,IAAI,sCAAsC,SAAS,IAAI,CAAC;QACpE,MAAM,OAAO,GAAG,yBAAyB,CAAC;QAC1C,OAAO,CAAC,KAAK,CAAC,yCAAyC,OAAO,QAAQ,YAAY,EAAE,CAAC,CAAC;QACtF,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;gBACzB,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AAE,EAAE,CAAC;QAC1B,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;YACzB,OAAO;YACP,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;SACtF,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- interface ReportTestRestulsOptions {
2
- reportFile: string;
3
- dryRun: boolean;
4
- jobUrl?: string;
5
- repository?: string;
6
- workflowName?: string;
7
- }
8
- export declare const reportTestRestuls: ({ dryRun, reportFile: jsonResultsPath, jobUrl, workflowName, repository, }: ReportTestRestulsOptions) => Promise<void>;
9
- export {};
10
- //# sourceMappingURL=test-report.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-report.d.ts","sourceRoot":"","sources":["../../bin/test-report.ts"],"names":[],"mappings":"AAIA,UAAU,wBAAwB;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,eAAO,MAAM,iBAAiB,GAAU,4EAMrC,wBAAwB,kBA4E1B,CAAC"}
@@ -1,74 +0,0 @@
1
- import fs from 'fs/promises';
2
- import { sendSlackMessage } from './slack.js';
3
- import { getEnvVar } from './utils.js';
4
- export const reportTestRestuls = async ({ dryRun, reportFile: jsonResultsPath, jobUrl, workflowName, repository, }) => {
5
- const results = JSON.parse((await fs.readFile(jsonResultsPath)).toString());
6
- const passed = [];
7
- const failed = [];
8
- for (const result of results.testResults) {
9
- if (result.status !== 'failed') {
10
- passed.push(...result.assertionResults);
11
- continue;
12
- }
13
- for (const aResult of result.assertionResults) {
14
- if (aResult.status !== 'failed') {
15
- passed.push(aResult);
16
- }
17
- else {
18
- failed.push(aResult);
19
- }
20
- }
21
- }
22
- const failedAssertions = [];
23
- console.error();
24
- console.error(`PASSED: ${passed.length}, FAILED: ${failed.length}`);
25
- console.error();
26
- console.error('**************************************************');
27
- console.error('* Successes *');
28
- console.error('**************************************************');
29
- console.error();
30
- for (const [i, aResult] of passed.entries()) {
31
- const { fullName } = aResult;
32
- console.error(`${i + 1}) ${fullName} ... ${aResult.meta.runLink}`);
33
- console.error();
34
- }
35
- console.error('**************************************************');
36
- console.error('* Failures *');
37
- console.error('**************************************************');
38
- console.error();
39
- for (const [i, aResult] of failed.entries()) {
40
- const { failureMessages, fullName, meta } = aResult;
41
- if (failureMessages) {
42
- failedAssertions.push(...failureMessages.map(message => ({ message: message.split('\n')?.[0], runLink: meta.runLink, actorName: meta.actorName })));
43
- }
44
- console.error(`${i + 1}) ${fullName} ... ${meta.runLink}`);
45
- console.error();
46
- }
47
- console.error();
48
- console.error(`PASSED: ${passed.length}, FAILED: ${failed.length}`);
49
- console.error();
50
- if (failedAssertions.length === 0) {
51
- return;
52
- }
53
- // TODO: add slack profiles
54
- const total = failed.length + passed.length;
55
- const jobLink = jobUrl ? ` Check <${jobUrl}|the job>.` : '';
56
- let slackMessage = `\`${workflowName ?? '-'}\`: *${repository ?? '-'}*`;
57
- slackMessage += `: has ${failedAssertions.length} failed assertions. Failing test suites: ${failed.length}/${total}.${jobLink}`;
58
- slackMessage += `\n\n${failedAssertions[0].message} --- <${failedAssertions[0].runLink}|${failedAssertions[0].actorName}>`;
59
- const blocks = failedAssertions.slice(1).map(({ message, runLink, actorName }) => `• ${message} --- <${runLink}|${actorName}>`);
60
- if (!repository) {
61
- console.error(`Repository not provided, not sending slack notification`);
62
- return;
63
- }
64
- // remove repository-owner part
65
- const channel = `#notif-${repository.replace(/[^/]+\//, '')}`;
66
- console.error(`Sending a notification to slack channel ${channel}`);
67
- console.error('SLACK:', slackMessage);
68
- console.error('\tblocks:', blocks.join('\n\t\t'));
69
- if (!dryRun) {
70
- const slackToken = getEnvVar('SLACK_TOKEN_TESTS_BOT');
71
- await sendSlackMessage(channel, slackMessage, blocks, slackToken);
72
- }
73
- };
74
- //# sourceMappingURL=test-report.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-report.js","sourceRoot":"","sources":["../../bin/test-report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAUvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,EACpC,MAAM,EACN,UAAU,EAAE,eAAe,EAC3B,MAAM,EACN,YAAY,EACZ,UAAU,GACa,EAAE,EAAE;IAC3B,MAAM,OAAO,GAAoB,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7F,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,MAAM,MAAM,GAA0B,EAAE,CAAC;IAEzC,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACvC,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;YACxC,SAAS;QACb,CAAC;QACD,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC5C,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;gBAC9B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,CAAC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,SAAS,EAAE,EAAE,EAAE,CAAC,KAAK,OAAO,SAAS,OAAO,IAAI,SAAS,GAAG,CAAC,CAAC;IAEhI,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QACzE,OAAM;IACV,CAAC;IAED,+BAA+B;IAC/B,MAAM,OAAO,GAAG,UAAU,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;IAC9D,OAAO,CAAC,KAAK,CAAC,2CAA2C,OAAO,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACtC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,MAAM,UAAU,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC;QACtD,MAAM,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IACtE,CAAC;AACL,CAAC,CAAC"}
@@ -1,89 +0,0 @@
1
- export interface Config {
2
- targetBranch: string;
3
- sourceBranch: string;
4
- baseCommit?: string;
5
- workspace?: string;
6
- }
7
- export type Commit = {
8
- sha: string;
9
- author: string;
10
- date: string;
11
- message: string;
12
- };
13
- export interface GitHubHeadCommit {
14
- added: string[];
15
- removed: string[];
16
- modified: string[];
17
- author: {
18
- name: string;
19
- };
20
- message: string;
21
- id: string;
22
- }
23
- export interface Repository {
24
- full_name: string;
25
- name: string;
26
- ssh_url: string;
27
- owner: {
28
- login: string;
29
- };
30
- }
31
- export type GitHubEvent = GitHubEventPullRequest | GitHubEventPush;
32
- export type RawGitHubEvent = Partial<Omit<GitHubEventPullRequest, 'type'> & Omit<GitHubEventPush, 'type'>>;
33
- export interface GitHubEventPullRequest {
34
- type: 'pull_request';
35
- pull_request: {
36
- number: number;
37
- base: {
38
- ref: string;
39
- sha: string;
40
- };
41
- head: {
42
- ref: string;
43
- sha: string;
44
- };
45
- };
46
- repository: Repository;
47
- }
48
- export interface GitHubEventPush {
49
- type: 'push';
50
- head_commit: GitHubHeadCommit;
51
- repository: Repository;
52
- ref: string;
53
- commits: GithubCommit[];
54
- before: string;
55
- after: string;
56
- }
57
- export interface GithubCommit {
58
- id: string;
59
- tree_id: string;
60
- distinct: boolean;
61
- message: string;
62
- timestamp: string;
63
- url: string;
64
- author: {
65
- name: string;
66
- email: string;
67
- username: string;
68
- };
69
- committer: {
70
- name: string;
71
- email: string;
72
- username: string;
73
- };
74
- added: string[];
75
- removed: string[];
76
- modified: string[];
77
- }
78
- export interface BuildData {
79
- buildId: string;
80
- actorId: string;
81
- actorName: string;
82
- buildNumber: string;
83
- }
84
- export interface ActorConfig {
85
- actorName: string;
86
- folder: string;
87
- isStandalone: boolean;
88
- }
89
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../bin/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,MAAM,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAClB,CAAA;AAGD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;KACf,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;I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K,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,SAAS,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAElB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAA;CACxB"}
package/dist/bin/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../bin/types.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- import type { ActorConfig, GitHubEvent } from './types.js';
2
- export declare const spawnCommandInGhWorkspace: (command: string, args?: string[]) => string;
3
- export declare const getRepoName: (githubEvent: GitHubEvent) => string;
4
- export declare const getEnvVar: (varName: string, defaultValue?: string) => string;
5
- export declare const getRunUrlKvsKey: (runnerName: string) => string;
6
- /**
7
- * Reads and parses all directories in `actors` directory
8
- * This works locally if checkoutRepoLocally is called first
9
- */
10
- export declare const getRepoActors: () => Promise<ActorConfig[]>;
11
- export declare const setCwd: ({ workspace }: {
12
- workspace: string | undefined;
13
- }) => void;
14
- export declare const getHeadCommitSha: (githubEvent: GitHubEvent) => string;
15
- export interface GetChangedActorsResult {
16
- actorsChanged: ActorConfig[];
17
- codeChanged: boolean;
18
- }
19
- interface ShouldBuildAndTestOptions {
20
- filepathsChanged: string[];
21
- actorConfigs: ActorConfig[];
22
- isLatest?: boolean;
23
- }
24
- /**
25
- * Latest and devel are the same except that for latest we also rebuild with README and CHANGELOG files
26
- */
27
- export declare const getChangedActors: ({ filepathsChanged, actorConfigs, isLatest }: ShouldBuildAndTestOptions) => GetChangedActorsResult;
28
- export {};
29
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../bin/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,WAAW,EAEX,WAAW,EACd,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,EAAE,OAAM,MAAM,EAAO,WAgB7E,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,aAAa,WAAW,WAGnD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,EAAE,eAAe,MAAM,KAAG,MAMlE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,WAEjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,WAAW,EAAE,CA+B3D,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,eAAe;IAAE,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,SAOtE,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,aAAa,WAAW,WAIxD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,UAAU,yBAAyB;IAC/B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,WAAW,EAAE,CAAC;IAE5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AA2BD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GACzB,8CAAsD,yBAAyB,KAChF,sBAyEF,CAAC"}
package/dist/bin/utils.js DELETED
@@ -1,169 +0,0 @@
1
- import fs from 'node:fs/promises';
2
- import { spawnSync } from 'node:child_process';
3
- export const spawnCommandInGhWorkspace = (command, args = []) => {
4
- console.error(command, args.join(' '));
5
- const commandResult = spawnSync(command, args, { shell: true, maxBuffer: 100 * 1024 * 1024 });
6
- if (commandResult.error) {
7
- throw new Error(`[Command failed]: ${command}\n${commandResult.error}`);
8
- }
9
- if (commandResult.stderr.toString().length > 0) {
10
- // For some reason 'git' command prints stderr when checking out to detached HEAD state (we only use detached HEAD for testing though)
11
- if (!commandResult.stderr.toString().includes(`You are in 'detached HEAD' state`)) {
12
- throw new Error(`[Command printed stderr]: ${command}\n${commandResult.stderr.toString()}`);
13
- }
14
- }
15
- return commandResult.stdout.toString().trim();
16
- };
17
- export const getRepoName = (githubEvent) => {
18
- const [, repoName] = githubEvent.repository.full_name.split('/');
19
- return repoName;
20
- };
21
- export const getEnvVar = (varName, defaultValue) => {
22
- const value = process.env[varName] ?? defaultValue;
23
- if (!value) {
24
- throw new Error(`${varName} not defined`);
25
- }
26
- return value;
27
- };
28
- export const getRunUrlKvsKey = (runnerName) => {
29
- return `RUN_URL-${runnerName}`;
30
- };
31
- /**
32
- * Reads and parses all directories in `actors` directory
33
- * This works locally if checkoutRepoLocally is called first
34
- */
35
- export const getRepoActors = async () => {
36
- let actorDirs;
37
- try {
38
- actorDirs = (await fs.readdir(`./actors`)).map((dir) => `actors/${dir}`);
39
- }
40
- catch (err) {
41
- console.warn(`No /actors directory found in repo`);
42
- actorDirs = [];
43
- }
44
- let standaloneActorDirs;
45
- try {
46
- standaloneActorDirs = (await fs.readdir(`./standalone-actors`)).map((dir) => `standalone-actors/${dir}`);
47
- }
48
- catch (err) {
49
- console.warn(`No /standalone-actors directory found in repo`);
50
- standaloneActorDirs = [];
51
- }
52
- const actorConfigs = [];
53
- for (const actorDir of [...actorDirs, ...standaloneActorDirs]) {
54
- const match = actorDir.match(/^([^/]+)\/(.+)_([^_]+)$/);
55
- if (!match) {
56
- throw new Error(`Invalid actor directory name. Got "${actorDir}", expected "actor.owner-name_actor-name"`);
57
- }
58
- const [, folderType, owner, actorName] = match;
59
- actorConfigs.push({
60
- actorName: `${owner}/${actorName}`,
61
- folder: actorDir,
62
- isStandalone: folderType === 'standalone-actors',
63
- });
64
- }
65
- console.error(`Actors in repo: ${actorConfigs.filter(({ isStandalone }) => !isStandalone).map(({ actorName }) => actorName).join(', ')}`);
66
- console.error(`Standalone actors in repo: ${actorConfigs.filter(({ isStandalone }) => !!isStandalone).map(({ actorName }) => actorName).join(', ')}`);
67
- return actorConfigs;
68
- };
69
- export const setCwd = ({ workspace }) => {
70
- if (workspace) {
71
- process.chdir(workspace);
72
- return;
73
- }
74
- const ghWorkspace = getEnvVar('GITHUB_WORKSPACE', process.cwd());
75
- process.chdir(ghWorkspace);
76
- };
77
- export const getHeadCommitSha = (githubEvent) => {
78
- return githubEvent.type === 'pull_request'
79
- ? githubEvent.pull_request.head.sha
80
- : githubEvent.head_commit.id;
81
- };
82
- /**
83
- * Also works for folders
84
- */
85
- const isIgnoredTopLevelFile = (lowercaseFilePath) => {
86
- // On top level, we should only have dev-only readme and .actor/ is just for apify push CLI (real Actor configs are in /actors)
87
- const IGNORED_TOP_LEVEL_FILES = ['.vscode/', '.gitignore', 'readme.md', '.husky/', '.eslintrc', '.editorconfig', '.actor/'];
88
- // Strip out deprecated /code and /shared folders, treat them as top-level code
89
- const sanitizedLowercaseFilePath = lowercaseFilePath.replace(/^code\//, '').replace(/^shared\//, '');
90
- return IGNORED_TOP_LEVEL_FILES.some((ignoredFile) => sanitizedLowercaseFilePath.startsWith(ignoredFile));
91
- };
92
- const isLatestBuildOnlyFile = (lowercaseFilePath) => {
93
- if (lowercaseFilePath.endsWith('changelog.md')) {
94
- return true;
95
- }
96
- // Either in /actors or /standalone-actors, we need to rebuild readme but we don't rebuild top-level dev-only readme
97
- if ((lowercaseFilePath.startsWith('actors/') || lowercaseFilePath.startsWith('standalone-actors/')) && lowercaseFilePath.endsWith('readme.md')) {
98
- return true;
99
- }
100
- return false;
101
- };
102
- /**
103
- * Latest and devel are the same except that for latest we also rebuild with README and CHANGELOG files
104
- */
105
- export const getChangedActors = ({ filepathsChanged, actorConfigs, isLatest = false }) => {
106
- let codeChanged = false;
107
- // folder -> ActorConfig
108
- const actorsChangedMap = new Map();
109
- const actorConfigsWithoutStandalone = actorConfigs.filter(({ isStandalone }) => !isStandalone);
110
- const lowercaseFiles = filepathsChanged.map((file) => file.toLowerCase());
111
- for (const lowercaseFilePath of lowercaseFiles) {
112
- if (isIgnoredTopLevelFile(lowercaseFilePath)) {
113
- continue;
114
- }
115
- // First we check for specific actors that have configs in /actors or standalone actors in /standalone-actors
116
- // This matches both actors/username_actorName and standalone-actors/username_actorName
117
- const changedActorConfigMatch = lowercaseFilePath.match(/^(?:standalone-)?actors\/([^/]+)\/.+/);
118
- if (changedActorConfigMatch) {
119
- const sanitizedActorName = changedActorConfigMatch[1].replace('_', '/');
120
- const actorConfigChanged = actorConfigs.find(({ actorName }) => actorName.toLowerCase() === sanitizedActorName);
121
- if (actorConfigChanged === undefined) {
122
- console.warn('changes was found in an actor folder which no longer exists in the current commit', {
123
- actorName: sanitizedActorName,
124
- actorFolderName: changedActorConfigMatch[1],
125
- });
126
- continue;
127
- }
128
- console.error(`actorConfigChanged ${actorConfigChanged.actorName}: sanitizedActorName ${sanitizedActorName} ${lowercaseFilePath} `);
129
- // These can be nested at various folders inside the actor folder
130
- if (isLatest || !isLatestBuildOnlyFile(lowercaseFilePath)) {
131
- // We assume other files will are either actor.json or input_schema.json and those needs to be tested
132
- // TODO: Check what changed in schema, we don't need to test description changes
133
- actorsChangedMap.set(actorConfigChanged.folder, actorConfigChanged);
134
- }
135
- continue;
136
- }
137
- // We check top level files (formerly in /code and /shared folders) that are shared among all non-standalone Actors
138
- // Standalone actors are always handled separately by name via changedActorConfigMatch
139
- if (isLatest || !isLatestBuildOnlyFile(lowercaseFilePath)) {
140
- codeChanged = !isLatest; // NOTE: code is changed only in PR
141
- for (const actorConfig of actorConfigsWithoutStandalone) {
142
- actorsChangedMap.set(actorConfig.folder, actorConfig);
143
- }
144
- }
145
- }
146
- const actorsChanged = Array.from(actorsChangedMap.values());
147
- // All below here is just for logging
148
- const ignoredFilesChanged = lowercaseFiles.filter((file) => isIgnoredTopLevelFile(file));
149
- console.error(`[DIFF]: Top level files changed that we ignore (don't trigger test or build): ${ignoredFilesChanged.join(', ')}`);
150
- const onlyLatestFilesChanged = lowercaseFiles.filter((file) => isLatestBuildOnlyFile(file));
151
- console.error(`[DIFF]: Files changed that only trigger latest build: ${onlyLatestFilesChanged.join(', ')}`);
152
- if (!isLatest && codeChanged) {
153
- console.error(`[DIFF]: All non-standalone Actors need to be built and tested (changes in top-level code)`);
154
- }
155
- if (actorsChanged.length > 0) {
156
- const miniactors = actorsChanged.filter((config) => !config.isStandalone).map((config) => config.actorName);
157
- const standaloneActors = actorsChanged.filter((config) => config.isStandalone).map((config) => config.actorName);
158
- console.error(`[DIFF]: MiniActors to be built and tested: ${miniactors.join(', ')}`);
159
- console.error(`[DIFF]: Standalone Actors to be built and tested: ${standaloneActors.join(', ')}`);
160
- }
161
- else {
162
- console.error(`[DIFF]: No relevant files changed, skipping builds and tests`);
163
- }
164
- return {
165
- actorsChanged,
166
- codeChanged,
167
- };
168
- };
169
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../bin/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO/C,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAE,OAAiB,EAAE,EAAE,EAAE;IAC9E,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,EAA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AC,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjH,OAAO,CAAC,KAAK,CAAC,8CAA8C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACrF,OAAO,CAAC,KAAK,CAAC,qDAAqD,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtG,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IAED,OAAO;QACH,aAAa;QACb,WAAW;KACd,CAAC;AACN,CAAC,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export { describe, testActor, testStandbyActor, ExpectStatic } from './lib/lib.js';
2
- export { RunTestResult } from './lib/run-test-result.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
package/dist/index.js DELETED
@@ -1,3 +0,0 @@
1
- export { describe, testActor, testStandbyActor } from './lib/lib.js';
2
- export { RunTestResult } from './lib/run-test-result.js';
3
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAgB,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ToFinishWithOptionsWithDefaults } from './types.js';
2
- export declare const TO_FINISH_WITH_OPTIONS: ToFinishWithOptionsWithDefaults;
3
- //# sourceMappingURL=consts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../lib/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAElE,eAAO,MAAM,sBAAsB,EAAE,+BAUpC,CAAC"}
@@ -1,12 +0,0 @@
1
- export const TO_FINISH_WITH_OPTIONS = {
2
- status: 'SUCCEEDED',
3
- duration: {
4
- min: 600, // 0.6 sec
5
- max: 600_000, // 10 min
6
- },
7
- failedRequests: 0,
8
- requestsRetries: { max: 3 },
9
- maxRetriesPerRequest: null,
10
- forbiddenLogs: ['ReferenceError', 'TypeError'],
11
- };
12
- //# sourceMappingURL=consts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../lib/consts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAoC;IACnE,MAAM,EAAE,WAAW;IACnB,QAAQ,EAAE;QACN,GAAG,EAAE,GAAG,EAAE,UAAU;QACpB,GAAG,EAAE,OAAO,EAAE,SAAS;KAC1B;IACD,cAAc,EAAE,CAAC;IACjB,eAAe,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;IAC3B,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,CAAC,gBAAgB,EAAE,WAAW,CAAC;CACjD,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ExpectStatic } from 'vitest';
2
- export declare const extendExpect: (expect: ExpectStatic) => ExpectStatic;
3
- //# sourceMappingURL=extend-expect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extend-expect.d.ts","sourceRoot":"","sources":["../../lib/extend-expect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,QAAQ,CAAC;AAMtD,eAAO,MAAM,YAAY,GAAI,QAAQ,YAAY,KAAG,YAwQnD,CAAC"}