-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/github-action/retain-spaces/31360
- Loading branch information
Showing
28 changed files
with
667 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
FROM ghcr.io/containerbase/devcontainer:13.0.21 | ||
FROM ghcr.io/containerbase/devcontainer:13.0.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
import { isScheduledNow } from '../../../workers/repository/update/branch/schedule'; | ||
import type { RenovateConfig } from '../../types'; | ||
import { presets } from './schedule'; | ||
|
||
describe('config/presets/internal/schedule', () => { | ||
let config: RenovateConfig; | ||
|
||
beforeAll(() => { | ||
jest.useFakeTimers(); | ||
}); | ||
|
||
beforeEach(() => { | ||
jest.setSystemTime(new Date('2017-06-30T10:50:00.000')); // Locally 2017-06-30 10:50am | ||
|
||
config = {}; | ||
}); | ||
|
||
describe('daily', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-06-30T00:50:00.000'} | ${true} | ||
${'2017-06-30T01:50:00.000'} | ${true} | ||
${'2017-06-30T02:50:00.000'} | ${true} | ||
${'2017-06-30T03:50:00.000'} | ${true} | ||
${'2017-06-30T04:50:00.000'} | ${false} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.daily.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('earlyMondays', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-06-26T00:50:00.000'} | ${true} | ||
${'2017-06-26T01:50:00.000'} | ${true} | ||
${'2017-06-26T02:50:00.000'} | ${true} | ||
${'2017-06-26T03:50:00.000'} | ${true} | ||
${'2017-06-26T04:50:00.000'} | ${false} | ||
${'2017-06-30T00:50:00.000'} | ${false} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.earlyMondays.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('monthly', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-06-01T00:50:00.000'} | ${true} | ||
${'2017-06-01T01:50:00.000'} | ${true} | ||
${'2017-06-01T02:50:00.000'} | ${true} | ||
${'2017-06-01T03:50:00.000'} | ${true} | ||
${'2017-06-01T04:50:00.000'} | ${false} | ||
${'2017-06-02T00:50:00.000'} | ${false} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.monthly.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('nonOfficeHours', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-06-01T00:50:00.000'} | ${true} | ||
${'2017-06-01T01:50:00.000'} | ${true} | ||
${'2017-06-01T02:50:00.000'} | ${true} | ||
${'2017-06-01T03:50:00.000'} | ${true} | ||
${'2017-06-01T04:50:00.000'} | ${true} | ||
${'2017-06-01T10:50:00.000'} | ${false} | ||
${'2017-06-01T11:50:00.000'} | ${false} | ||
${'2017-06-01T22:50:00.000'} | ${true} | ||
${'2017-06-01T23:50:00.000'} | ${true} | ||
${'2017-06-03T09:50:00.000'} | ${true} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.nonOfficeHours.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
// const weekdays = ['every weekday']; | ||
// const weekends = ['every weekend']; | ||
// const yearly = ['every 12 months on the first day of the month']; | ||
describe('quarterly', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-01-01T00:50:00.000'} | ${true} | ||
${'2017-04-01T01:50:00.000'} | ${true} | ||
${'2017-07-01T02:50:00.000'} | ${true} | ||
${'2017-10-01T03:50:00.000'} | ${true} | ||
${'2017-02-01T04:50:00.000'} | ${false} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.quarterly.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('weekdays', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-06-01T00:50:00.000'} | ${true} | ||
${'2017-06-02T01:50:00.000'} | ${true} | ||
${'2017-06-03T02:50:00.000'} | ${false} | ||
${'2017-06-04T03:50:00.000'} | ${false} | ||
${'2017-06-05T04:50:00.000'} | ${true} | ||
${'2017-06-06T10:50:00.000'} | ${true} | ||
${'2017-06-07T11:50:00.000'} | ${true} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.weekdays.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('weekends', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-06-01T00:50:00.000'} | ${false} | ||
${'2017-06-02T01:50:00.000'} | ${false} | ||
${'2017-06-03T02:50:00.000'} | ${true} | ||
${'2017-06-04T03:50:00.000'} | ${true} | ||
${'2017-06-05T04:50:00.000'} | ${false} | ||
${'2017-06-06T10:50:00.000'} | ${false} | ||
${'2017-06-07T11:50:00.000'} | ${false} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.weekends.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('yearly', () => { | ||
it.each` | ||
datetime | expected | ||
${'2017-01-01T00:50:00.000'} | ${true} | ||
${'2017-02-02T01:50:00.000'} | ${false} | ||
${'2018-01-01T02:50:00.000'} | ${true} | ||
`('$datetime', ({ datetime, expected }) => { | ||
config.schedule = presets.yearly.schedule; | ||
jest.setSystemTime(new Date(datetime)); | ||
expect(isScheduledNow(config)).toBe(expected); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
lib/modules/datasource/pypi/__snapshots__/index.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This datasource uses the following logic to determine lookup URLs: | ||
|
||
- If the normalized registryUrl ends in `/simple/` or `/+simple/` then only the simple API will be tried | ||
- Otherwise, the JSON API will be tried first | ||
- If the JSON API returns a result, it will be used | ||
- If the JSON API throws an error (e.g. 403, 404) then the simple API will be tried |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.