Skip to content

Commit b78d167

Browse files
YasenTYasen Trahnov
andauthored
test ci (#3)
Initial CI setup, cleanup, placeholder tests etc. All tests passing clean at this stage. --------- Co-authored-by: Yasen Trahnov <[email protected]>
1 parent c13845a commit b78d167

31 files changed

+275
-199
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
prefix: "[PIP] "
1010
open-pull-requests-limit: 10
1111
- package-ecosystem: "pip"
12-
directory: "/pulp-glue-ostree"
12+
directory: "/pulp-glue-console"
1313
schedule:
1414
interval: "daily"
1515
commit-message:

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
name: "pulp_cli_packages"
3333
path: |
34-
pulp-glue-ostree/dist/
34+
pulp-glue-console/dist/
3535
dist/
3636
if-no-files-found: "error"
3737
retention-days: 5

.github/workflows/cookiecutter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
defaults:
77
run:
8-
working-directory: "pulp-cli-ostree"
8+
working-directory: "pulp-cli-console"
99

1010
jobs:
1111
update-ci:
@@ -18,7 +18,7 @@ jobs:
1818
- uses: "actions/checkout@v4"
1919
with:
2020
token: "${{ secrets.RELEASE_TOKEN }}"
21-
path: "pulp-cli-ostree"
21+
path: "pulp-cli-console"
2222
- name: "Set up Python"
2323
uses: "actions/setup-python@v5"
2424
with:
@@ -47,7 +47,7 @@ jobs:
4747
body: ""
4848
branch: "update_cookiecutter"
4949
delete-branch: true
50-
path: "pulp-cli-ostree"
50+
path: "pulp-cli-console"
5151
- name: "Mark PR automerge"
5252
run: |
5353
gh pr merge --rebase --auto "${{ steps.create_pr.outputs.pull-request-number }}"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
python-version: "${{ matrix.python }}"
3333
- name: "Install python dependencies"
3434
run: |
35-
pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r lint_requirements.txt
35+
pip install dist/pulp_cli_console-*.whl pulp-glue-console/dist/pulp_glue_console-*.whl -r lint_requirements.txt
3636
- name: "Lint code"
3737
run: |
3838
make lint

.github/workflows/test.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,20 @@ jobs:
5353
with:
5454
python-version: "${{ matrix.python }}"
5555
allow-prereleases: true
56-
- name: "Install Binary Test Dependencies"
57-
run: |
58-
sudo apt-get install ostree
5956
- name: "Install Python Test Dependencies"
6057
run: |
6158
if [ "${{matrix.lower_bounds}}" ]
6259
then
63-
pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r test_requirements.txt -c lower_bounds_constraints.lock
60+
pip install dist/pulp_cli_console-*.whl pulp-glue-console/dist/pulp_glue_console-*.whl -r test_requirements.txt -c lower_bounds_constraints.lock
6461
elif [ "${{matrix.upper_bounds}}" ]
6562
then
66-
.ci/scripts/calc_constraints.py pyproject.toml pulp-glue-ostree/pyproject.toml --upper > upper_bounds_constraints.lock
67-
pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r test_requirements.txt -c upper_bounds_constraints.lock
63+
.ci/scripts/calc_constraints.py pyproject.toml pulp-glue-console/pyproject.toml --upper > upper_bounds_constraints.lock
64+
pip install dist/pulp_cli_console-*.whl pulp-glue-console/dist/pulp_glue_console-*.whl -r test_requirements.txt -c upper_bounds_constraints.lock
6865
else
69-
pip install dist/pulp_cli_ostree-*.whl pulp-glue-ostree/dist/pulp_glue_ostree-*.whl -r test_requirements.txt
66+
pip install dist/pulp_cli_console-*.whl pulp-glue-console/dist/pulp_glue_console-*.whl -r test_requirements.txt
7067
fi
68+
- name: "Set script permissions"
69+
run: chmod +x .ci/run_container.sh
7170
- name: "Run tests"
7271
env:
7372
CONTAINER_RUNTIME: "${{ matrix.container_runtime }}"

Makefile

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@ GLUE_PLUGINS=$(notdir $(wildcard pulp-glue-console/pulp_glue/*))
22
CLI_PLUGINS=$(notdir $(wildcard pulpcore/cli/*))
33

44
info:
5-
@echo Pulp glue
6-
@echo plugins: $(GLUE_PLUGINS)
7-
@echo Pulp CLI
8-
@echo plugins: $(CLI_PLUGINS)
5+
@echo Pulp glue
6+
@echo plugins: $(GLUE_PLUGINS)
7+
@echo Pulp CLI
8+
@echo plugins: $(CLI_PLUGINS)
99

1010
build:
11-
cd pulp-glue-console; pyproject-build -n
12-
pyproject-build -n
11+
cd pulp-glue-console; pyproject-build -n
12+
pyproject-build -n
1313

1414
black: format
1515

1616
format:
17-
isort .
18-
cd pulp-glue-console; isort .
19-
black .
17+
isort .
18+
cd pulp-glue-console; isort .
19+
black .
2020

2121
lint:
22-
find tests .ci -name '*.sh' -print0 | xargs -0 shellcheck -x
23-
isort -c --diff .
24-
cd pulp-glue-console; isort -c --diff .
25-
black --diff --check .
26-
flake8
27-
.ci/scripts/check_cli_dependencies.py
28-
.ci/scripts/check_click_for_mypy.py
29-
MYPYPATH=pulp-glue-console mypy
30-
cd pulp-glue-console; mypy
31-
@echo "🙊 Code 🙈 LGTM 🙉 !"
22+
find tests .ci -name '*.sh' -print0 | xargs -0 shellcheck -x
23+
isort -c --diff .
24+
cd pulp-glue-console; isort -c --diff .
25+
black --diff --check .
26+
flake8
27+
python3 .ci/scripts/check_cli_dependencies.py
28+
python3 .ci/scripts/check_click_for_mypy.py
29+
MYPYPATH=pulp-glue-console mypy
30+
cd pulp-glue-console; mypy
31+
@echo "🙊 Code 🙈 LGTM 🙉 !"
3232

3333
tests/cli.toml:
34-
35-
@echo "In order to configure the tests to talk to your test server, you might need to edit $@ ."
34+
cp $@.example $@
35+
@echo "In order to configure the tests to talk to your test server, you might need to edit $@ ."
3636

3737
test: | tests/cli.toml
38-
python3 -m pytest -v tests pulp-glue-console/tests
38+
python3 -m pytest -v tests pulp-glue-console/tests
3939

4040
livetest: | tests/cli.toml
41-
python3 -m pytest -v tests pulp-glue-console/tests -m live
41+
python3 -m pytest -v tests pulp-glue-console/tests -m live
4242

4343
unittest:
44-
python3 -m pytest -v tests pulp-glue-console/tests -m "not live"
44+
python3 -m pytest -v tests pulp-glue-console/tests -m "not live"
4545

4646
unittest_glue:
47-
python3 -m pytest -v pulp-glue-console/tests -m "not live"
47+
python3 -m pytest -v pulp-glue-console/tests -m "not live"
4848
.PHONY: build info black lint test

lint_requirements.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Lint requirements
2+
black==25.1.0
3+
flake8==7.1.2
4+
flake8-pyproject==1.2.3
5+
isort==6.0.0
6+
mypy==1.15.0
7+
shellcheck-py==0.10.0.1
8+
9+
# Type annotation stubs
10+
types-pygments
11+
types-PyYAML
12+
types-requests
13+
types-setuptools
14+
types-toml
15+
16+
# Install the actual bits for mypy
17+
-r test_requirements.txt

lower_bounds_constraints.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pulp-cli==0.23.1
2+
pulp-glue==0.23.1
3+
click==8.0.0

pulp-glue-console/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Pulp Glue
2+
## The version agnostic Pulp 3 client library in python
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0.dev"

0 commit comments

Comments
 (0)