Skip to content

Commit 35c2d28

Browse files
committed
tests: verify that GCM deployments trigger only one combined run
Git Credential Manager is special in that we do not actually _build_ the program, we simply re-bundle whatever the project published at https://github.com/git-ecosystem/git-credential-manager. Therefore, we can get away with _not_ triggering a separate aarch64 run, but we can bundle i686, x86_64 and aarch64 packages in a single workflow run. Verify that this is actually what happens. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 3821b65 commit 35c2d28

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

__tests__/index.test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ let mockGitHubApiRequest = jest.fn((_context, _token, method, requestPath, paylo
103103
if (method === 'GET' && requestPath.endsWith('/pulls/86')) return {
104104
head: { sha: '707a11ee' }
105105
}
106+
if (method === 'GET' && requestPath.endsWith('/pulls/500')) return {
107+
head: { sha: '82e8648' }
108+
}
106109
if (method === 'GET' && requestPath.endsWith('/pulls/4322')) return {
107110
head: { sha: 'c8edb521bdabec14b07e9142e48cab77a40ba339' }
108111
}
@@ -339,6 +342,28 @@ The [x86_64](dispatched-workflow-build-and-deploy.yml) and the [i686](dispatched
339342
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['i686', 'x86_64'])
340343
})
341344

345+
testIssueComment('/deploy mingw-w64-git-credential-manager', {
346+
issue: {
347+
number: 500,
348+
title: 'mingw-w64-git-credential-manager: update to 2.1.2',
349+
body: 'This closes https://github.com/git-for-windows/git/issues/4415',
350+
pull_request: {
351+
html_url: 'https://github.com/git-for-windows/build-extra/pull/500'
352+
}
353+
},
354+
repository: {
355+
name: 'build-extra'
356+
}
357+
}, async (context) => {
358+
expect(await index(context, context.req)).toBeUndefined()
359+
expect(context.res.body).toEqual(`I edited the comment: appended-comment-body-existing comment body
360+
361+
The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
362+
expect(mockQueueCheckRun).toHaveBeenCalledTimes(1)
363+
expect(mockUpdateCheckRun).toHaveBeenCalledTimes(1)
364+
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual([undefined])
365+
})
366+
342367
testIssueComment('/add release note', {
343368
issue: {
344369
number: 4281,

0 commit comments

Comments
 (0)