diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 87cd4ed..b3d00ed 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -36,6 +36,7 @@ describe('run', () => { reportJobErrorSpy = jest.spyOn(ApiClient.prototype, 'reportJobError') jest.spyOn(core, 'info').mockImplementation(jest.fn()) + jest.spyOn(core, 'warning').mockImplementation(jest.fn()) jest.spyOn(core, 'setFailed').mockImplementation(jest.fn()) fs.mkdirSync(workingDirectory) @@ -78,7 +79,7 @@ describe('run', () => { await run(context) expect(core.setFailed).not.toHaveBeenCalled() - expect(core.info).toHaveBeenCalledWith( + expect(core.warning).toHaveBeenCalledWith( 'This workflow can only be triggered by Dependabot.' ) }) @@ -101,7 +102,7 @@ describe('run', () => { await run(context) expect(core.setFailed).not.toHaveBeenCalled() - expect(core.info).toHaveBeenCalledWith( + expect(core.warning).toHaveBeenCalledWith( "Dependabot Updater Action does not support 'issue_created' events." ) }) diff --git a/__tests__/updater-integration.test.ts b/__tests__/updater-integration.test.ts index 239ae76..5498fb3 100644 --- a/__tests__/updater-integration.test.ts +++ b/__tests__/updater-integration.test.ts @@ -54,6 +54,11 @@ describe('Updater', () => { }) afterEach(async () => { + // Skip the test when we haven't preloaded the updater image + if (process.env.SKIP_INTEGRATION_TESTS) { + return + } + server && server() // teardown server process await removeDanglingUpdaterContainers() fs.rmdirSync(workingDirectory, {recursive: true}) diff --git a/src/inputs.ts b/src/inputs.ts index dbb1d87..fd153f9 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -23,14 +23,14 @@ export function getJobParameters(ctx: Context): JobParameters | null { checkEnvironmentAndContext(ctx) if (ctx.actor !== DEPENDABOT_ACTOR) { - core.info('This workflow can only be triggered by Dependabot.') + core.warning('This workflow can only be triggered by Dependabot.') return null } if (ctx.eventName === DYNAMIC) { return fromWorkflowInputs(ctx) } else { - core.info( + core.warning( `Dependabot Updater Action does not support '${ctx.eventName}' events.` ) return null