Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI updates #2012

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
baseBranches: ['release_4', '5.0', '5.1', '5.2', '6.0', 'master'],
'pre-commit': { enabled: true },
regexManagers: [
/** Do updates on pre-commit additional dependencies */
{
fileMatch: ['^\\.pre\\-commit\\-config\\.yaml$'],
matchStrings: [" +- '?(?<depName>[^' @=]+)(@|==)(?<currentValue>[^' @=]+)'? # (?<datasource>.+)"],
},
/** Do update on the schema present in the ci/config.yaml */
{
fileMatch: ['^ci/config\\.yaml$'],
matchStrings: [
'.*https://raw\\.githubusercontent\\.com/(?<depName>[^\\s]+)/(?<currentValue>[0-9\\.]+)/.*',
],
datasourceTemplate: 'github-tags',
},
/** Do update on packages update (trigger a rebuild) */
{
fileMatch: ['^ci/dpkg\\-versions\\.yaml$'],
matchStrings: [" *(?<depName>[^'\\s]+): '?(?<currentValue>[^'\\s/]*[0-9][^'\\s/]*)'?"],
Expand All @@ -37,17 +40,18 @@
},
],
packageRules: [
/** Automerge the patch, the minor and the dev dependency */
/** Auto merge the dev dependency update */
{
matchDepTypes: ['devDependencies'],
automerge: true,
},
/** Group the patch and the minor */
/** Group and auto merge the patch updates */
{
matchUpdateTypes: ['patch'],
groupName: 'all patch versions',
automerge: true,
},
/** Group and auto merge the minor updates */
{
matchUpdateTypes: ['minor'],
groupName: 'all minor versions',
Expand All @@ -64,7 +68,7 @@
},
/** Accept only the patch on stabilization branches */
{
matchBaseBranches: ['/[0-9]\\..*/', '/release_.*/'],
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchUpdateTypes: ['major', 'minor', 'pin', 'digest', 'lockFileMaintenance', 'rollback', 'bump'],
enabled: false,
},
Expand All @@ -73,9 +77,18 @@
matchBaseBranches: ['/[0-9]\\..*/', '/release_.*/'],
schedule: ['on the 1st day of the month'],
},
/** Support the 4 parts of shellcheck-py version with a v prefix */
{
matchPackageNames: ['shellcheck-py/shellcheck-py'],
versioning: 'regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)$',
},
/** Update dpkg versions at any time */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchPaths: ['^ci/dpkg\\-versions\\.yaml$'],
schedule: ['at any time'],
groupName: 'dpkg',
automerge: true,
},
],
}
2 changes: 2 additions & 0 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ pre-commit==3.4.0
pytest==7.4.2
scikit-image==0.21.0
poetry-plugin-tweak-dependencies-version==1.5.1
poetry-dynamic-versioning==1.1.0
poetry-plugin-drop-python-upper-constraint==0.1.0
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ requires = [
"poetry-core>=1.0.0",
"poetry-dynamic-versioning[plugin]",
"poetry-plugin-tweak-dependencies-version",
"poetry-plugin-drop-python-upper-constraint"
"poetry-plugin-drop-python-upper-constraint",
"poetry-dynamic-versioning"
]
build-backend = "poetry.core.masonry.api"

Expand All @@ -201,7 +202,7 @@ vcs = "git"
pattern = "^(?P<base>\\d+(\\.\\d+)*)"
format-jinja = """
{%- if env.get("VERSION_TYPE") == "version_branch" -%}
{{serialize_pep440(bump_version(base, 0 if env.get("IS_MASTER") == "TRUE" else 2), dev=distance)}}
{{serialize_pep440(bump_version(base, 1 if env.get("IS_MASTER") == "TRUE" else 2), dev=distance)}}
{%- elif distance == 0 -%}
{{serialize_pep440(base)}}
{%- else -%}
Expand Down