Skip to content

Commit 30ae420

Browse files
committed
tests: verify regular MINGW-packages deployments
Regular MINGW-packages (i.e. packages where the programs _have_ to be built, unlike, say, Git Credential Manager) need to be deployed in separate workflow runs for the i686/x86_64 and for the aarch64 architectures, as packages cannot be cross-compiled for different architectures (except for i686 and x86_64). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 35c2d28 commit 30ae420

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
@@ -106,6 +106,9 @@ let mockGitHubApiRequest = jest.fn((_context, _token, method, requestPath, paylo
106106
if (method === 'GET' && requestPath.endsWith('/pulls/500')) return {
107107
head: { sha: '82e8648' }
108108
}
109+
if (method === 'GET' && requestPath.endsWith('/pulls/74')) return {
110+
head: { sha: 'a7e4b90' }
111+
}
109112
if (method === 'GET' && requestPath.endsWith('/pulls/4322')) return {
110113
head: { sha: 'c8edb521bdabec14b07e9142e48cab77a40ba339' }
111114
}
@@ -364,6 +367,28 @@ The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
364367
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual([undefined])
365368
})
366369

370+
testIssueComment('/deploy mingw-w64-curl', {
371+
issue: {
372+
number: 74,
373+
title: 'mingw-w64-curl: update to 8.0.1',
374+
body: 'This closes https://github.com/git-for-windows/git/issues/4354',
375+
pull_request: {
376+
html_url: 'https://github.com/git-for-windows/MINGW-packages/pull/74'
377+
}
378+
},
379+
repository: {
380+
name: 'MINGW-packages'
381+
}
382+
}, async (context) => {
383+
expect(await index(context, context.req)).toBeUndefined()
384+
expect(context.res.body).toEqual(`I edited the comment: appended-comment-body-existing comment body
385+
386+
The [i686/x86_64](dispatched-workflow-build-and-deploy.yml) and the [arm64](dispatched-workflow-build-and-deploy.yml) workflow runs were started.`)
387+
expect(mockQueueCheckRun).toHaveBeenCalledTimes(2)
388+
expect(mockUpdateCheckRun).toHaveBeenCalledTimes(2)
389+
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['aarch64', undefined])
390+
})
391+
367392
testIssueComment('/add release note', {
368393
issue: {
369394
number: 4281,

0 commit comments

Comments
 (0)