Skip to content

Commit 1eea6de

Browse files
committed
Experiment CI
1 parent 55eb656 commit 1eea6de

5 files changed

Lines changed: 32 additions & 13 deletions

File tree

.ci/scripts/check_release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int:
157157

158158
if reasons:
159159
curr_version = Version(last_tag)
160-
assert curr_version.base_version.startswith(
161-
branch
162-
), "Current-version has to belong to the current branch!"
160+
assert curr_version.base_version.startswith(branch), (
161+
"Current-version has to belong to the current branch!"
162+
)
163163
next_version = Version(f"{branch}.{curr_version.micro + 1}")
164164
print(
165165
f"A Z-release is needed for {branch}, "

.github/workflows/lint.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@ jobs:
3636
run: |
3737
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
3838
39-
# run black separately from flake8 to get a diff
40-
- name: "Run black"
39+
- name: "Check formating"
4140
run: |
42-
black --version
43-
black --check --diff .
41+
ruff format --check --diff
4442
45-
# Lint code.
46-
- name: "Run flake8"
43+
- name: "Lint code"
4744
run: |
48-
flake8
45+
ruff check --diff
4946
5047
- name: "Check for common gettext problems"
5148
run: |

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# WARNING: DO NOT EDIT!
2+
#
3+
# This file was generated by plugin_template, and is managed by it. Please use
4+
# './plugin-template --ci pulp_gem' to update this file.
5+
#
6+
# For more info visit https://github.com/pulp/plugin_template
7+
8+
.PHONY: format
9+
format:
10+
black .
11+
12+
.PHONY: lint
13+
lint:
14+
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
15+
bump-my-version bump --dry-run release
16+
black --check --diff .
17+
flake8
18+
check-manifest
19+
python .ci/scripts/check_requirements.py
20+
sh .ci/scripts/check_pulpcore_imports.sh
21+
sh .ci/scripts/check_gettext.sh

lint_requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
#
66
# For more info visit https://github.com/pulp/plugin_template
77

8-
black~=26.3 # Pin style to the year. https://black.readthedocs.io/en/stable/faq.html#how-stable-is-black-s-style
98
bump-my-version
109
check-manifest
11-
flake8
12-
flake8-black
1310
packaging
1411
yamllint
12+
ruff

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ exclude = '''
119119
)/
120120
'''
121121

122+
[tool.ruff]
123+
line-length = 100
124+
extend-exclude = ["pulp_gem/app/migrations"]
122125

123126
[tool.check-manifest]
124127
ignore = [

0 commit comments

Comments
 (0)