Skip to content

Commit 4d725a5

Browse files
authored
Merge branch 'master' into an/gpu-lora-slm-rank-sizing
2 parents a8b6ec9 + 9657dc3 commit 4d725a5

116 files changed

Lines changed: 32776 additions & 24175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
requests~=2.32
1+
requests~=2.33

.github/actions/wait-for-check-completion/dist/index.js

Lines changed: 26324 additions & 21750 deletions
Large diffs are not rendered by default.

.github/actions/wait-for-check-completion/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

.github/actions/wait-for-check-completion/dist/sourcemap-register.cjs

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

.github/actions/wait-for-check-completion/dist/sourcemap-register.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/wait-for-check-completion/package-lock.json

Lines changed: 2062 additions & 1032 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/wait-for-check-completion/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"name": "wait-for-check-completion",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Wait for a specific check to complete before proceeding",
55
"main": "dist/index.js",
6+
"type": "module",
67
"scripts": {
78
"build": "ncc build src/index.js -o dist --source-map",
8-
"test": "jest",
9+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
910
"dev": "node src/index.js"
1011
},
12+
"jest": {
13+
"transform": {}
14+
},
1115
"repository": {
1216
"type": "git",
1317
"url": "git+https://github.com/openvinotoolkit/openvino.git"
@@ -27,7 +31,7 @@
2731
"@actions/github": "^9.1.1"
2832
},
2933
"devDependencies": {
30-
"@vercel/ncc": "^0.38.1",
31-
"jest": "^29.7.0"
34+
"@vercel/ncc": "^0.44.0",
35+
"jest": "^30.4.2"
3236
}
3337
}

.github/actions/wait-for-check-completion/src/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
const core = require('@actions/core');
2-
const github = require('@actions/github');
1+
import * as core from '@actions/core';
2+
import * as github from '@actions/github';
3+
import { fileURLToPath } from 'node:url';
34

45
const CONCLUSION_STATES = {
56
SUCCESS: 'success',
@@ -74,7 +75,7 @@ async function waitForChecks(octokit, owner, repo, ref, checkNames, waitInterval
7475
core.info(`Check "${checkName}" is queued...`);
7576
}
7677
}
77-
78+
7879
if (pendingChecks.size) {
7980
core.info(`Still waiting for [${Array.from(pendingChecks).join(', ')}]. Waiting ${waitInterval} seconds before next check...`);
8081
await new Promise(resolve => setTimeout(resolve, waitIntervalMs));
@@ -193,8 +194,8 @@ async function run() {
193194
}
194195

195196
// Only run if this file is executed directly (not imported)
196-
if (require.main === module) {
197+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
197198
run();
198199
}
199200

200-
module.exports = { run, waitForChecks };
201+
export { run, waitForChecks };

.github/actions/wait-for-check-completion/src/index.test.js

Lines changed: 92 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
const { waitForChecks } = require('../src/index');
2-
const core = require('@actions/core');
3-
4-
// Mock the core module
5-
jest.mock('@actions/core');
1+
import { jest, describe, beforeEach, test, expect } from '@jest/globals';
2+
import { waitForChecks } from '../src/index.js';
63

74
describe('Wait for Check Completion Action', () => {
85
beforeEach(() => {
@@ -12,18 +9,15 @@ describe('Wait for Check Completion Action', () => {
129
describe('waitForChecks', () => {
1310
test('should wait for single check in array', async () => {
1411
const mockOctokit = {
12+
paginate: jest.fn().mockResolvedValue([{
13+
name: 'test-check',
14+
status: 'completed',
15+
conclusion: 'success',
16+
started_at: new Date().toISOString()
17+
}]),
1518
rest: {
1619
checks: {
17-
listForRef: jest.fn().mockResolvedValue({
18-
data: {
19-
check_runs: [{
20-
name: 'test-check',
21-
status: 'completed',
22-
conclusion: 'success',
23-
started_at: new Date().toISOString()
24-
}]
25-
}
26-
})
20+
listForRef: jest.fn()
2721
}
2822
}
2923
};
@@ -40,36 +34,36 @@ describe('Wait for Check Completion Action', () => {
4034

4135
expect(results['test-check'].status).toBe('completed');
4236
expect(results['test-check'].conclusion).toBe('success');
43-
expect(mockOctokit.rest.checks.listForRef).toHaveBeenCalledWith({
44-
owner: 'owner',
45-
repo: 'repo',
46-
ref: 'sha123',
47-
per_page: 100
48-
});
37+
expect(mockOctokit.paginate).toHaveBeenCalledWith(
38+
mockOctokit.rest.checks.listForRef,
39+
{
40+
owner: 'owner',
41+
repo: 'repo',
42+
ref: 'sha123',
43+
per_page: 100
44+
}
45+
);
4946
});
5047

5148
test('should wait for multiple checks to complete successfully', async () => {
5249
const mockOctokit = {
50+
paginate: jest.fn().mockResolvedValue([
51+
{
52+
name: 'test-check-1',
53+
status: 'completed',
54+
conclusion: 'success',
55+
started_at: new Date().toISOString()
56+
},
57+
{
58+
name: 'test-check-2',
59+
status: 'completed',
60+
conclusion: 'success',
61+
started_at: new Date().toISOString()
62+
}
63+
]),
5364
rest: {
5465
checks: {
55-
listForRef: jest.fn().mockResolvedValue({
56-
data: {
57-
check_runs: [
58-
{
59-
name: 'test-check-1',
60-
status: 'completed',
61-
conclusion: 'success',
62-
started_at: new Date().toISOString()
63-
},
64-
{
65-
name: 'test-check-2',
66-
status: 'completed',
67-
conclusion: 'success',
68-
started_at: new Date().toISOString()
69-
}
70-
]
71-
}
72-
})
66+
listForRef: jest.fn()
7367
}
7468
}
7569
};
@@ -88,61 +82,56 @@ describe('Wait for Check Completion Action', () => {
8882
expect(results['test-check-1'].conclusion).toBe('success');
8983
expect(results['test-check-2'].status).toBe('completed');
9084
expect(results['test-check-2'].conclusion).toBe('success');
91-
expect(mockOctokit.rest.checks.listForRef).toHaveBeenCalledWith({
92-
owner: 'owner',
93-
repo: 'repo',
94-
ref: 'sha123',
95-
per_page: 100
96-
});
85+
expect(mockOctokit.paginate).toHaveBeenCalledWith(
86+
mockOctokit.rest.checks.listForRef,
87+
{
88+
owner: 'owner',
89+
repo: 'repo',
90+
ref: 'sha123',
91+
per_page: 100
92+
}
93+
);
9794
});
9895

9996
test('should handle multiple checks with mixed progress states', async () => {
10097
let callCount = 0;
10198
const mockOctokit = {
99+
paginate: jest.fn().mockImplementation(() => {
100+
callCount++;
101+
if (callCount === 1) {
102+
return Promise.resolve([
103+
{
104+
name: 'test-check-1',
105+
status: 'completed',
106+
conclusion: 'success',
107+
started_at: new Date().toISOString()
108+
},
109+
{
110+
name: 'test-check-2',
111+
status: 'in_progress',
112+
conclusion: null,
113+
started_at: new Date().toISOString()
114+
}
115+
]);
116+
}
117+
return Promise.resolve([
118+
{
119+
name: 'test-check-1',
120+
status: 'completed',
121+
conclusion: 'success',
122+
started_at: new Date().toISOString()
123+
},
124+
{
125+
name: 'test-check-2',
126+
status: 'completed',
127+
conclusion: 'success',
128+
started_at: new Date().toISOString()
129+
}
130+
]);
131+
}),
102132
rest: {
103133
checks: {
104-
listForRef: jest.fn().mockImplementation(() => {
105-
callCount++;
106-
if (callCount === 1) {
107-
return Promise.resolve({
108-
data: {
109-
check_runs: [
110-
{
111-
name: 'test-check-1',
112-
status: 'completed',
113-
conclusion: 'success',
114-
started_at: new Date().toISOString()
115-
},
116-
{
117-
name: 'test-check-2',
118-
status: 'in_progress',
119-
conclusion: null,
120-
started_at: new Date().toISOString()
121-
}
122-
]
123-
}
124-
});
125-
} else {
126-
return Promise.resolve({
127-
data: {
128-
check_runs: [
129-
{
130-
name: 'test-check-1',
131-
status: 'completed',
132-
conclusion: 'success',
133-
started_at: new Date().toISOString()
134-
},
135-
{
136-
name: 'test-check-2',
137-
status: 'completed',
138-
conclusion: 'success',
139-
started_at: new Date().toISOString()
140-
}
141-
]
142-
}
143-
});
144-
}
145-
})
134+
listForRef: jest.fn()
146135
}
147136
}
148137
};
@@ -161,31 +150,28 @@ describe('Wait for Check Completion Action', () => {
161150
expect(results['test-check-1'].conclusion).toBe('success');
162151
expect(results['test-check-2'].status).toBe('completed');
163152
expect(results['test-check-2'].conclusion).toBe('success');
164-
expect(mockOctokit.rest.checks.listForRef).toHaveBeenCalledTimes(2);
153+
expect(mockOctokit.paginate).toHaveBeenCalledTimes(2);
165154
});
166155

167156
test('should timeout when some checks do not complete', async () => {
168157
const mockOctokit = {
158+
paginate: jest.fn().mockResolvedValue([
159+
{
160+
name: 'test-check-1',
161+
status: 'completed',
162+
conclusion: 'success',
163+
started_at: new Date().toISOString()
164+
},
165+
{
166+
name: 'test-check-2',
167+
status: 'in_progress',
168+
conclusion: null,
169+
started_at: new Date().toISOString()
170+
}
171+
]),
169172
rest: {
170173
checks: {
171-
listForRef: jest.fn().mockResolvedValue({
172-
data: {
173-
check_runs: [
174-
{
175-
name: 'test-check-1',
176-
status: 'completed',
177-
conclusion: 'success',
178-
started_at: new Date().toISOString()
179-
},
180-
{
181-
name: 'test-check-2',
182-
status: 'in_progress',
183-
conclusion: null,
184-
started_at: new Date().toISOString()
185-
}
186-
]
187-
}
188-
})
174+
listForRef: jest.fn()
189175
}
190176
}
191177
};

0 commit comments

Comments
 (0)