mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-07-29 02:44:35 +00:00
Merge pull request #78 from 0xFelix/vscode-venv
Add helper to build virtualenv and vscode configuration
This commit is contained in:
11
.gitignore
vendored
11
.gitignore
vendored
@@ -130,12 +130,21 @@ dmypy.json
|
|||||||
# Pyre type checker
|
# Pyre type checker
|
||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
.vscode/
|
# Allow specific vscode configuration
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
!.vscode/settings.json
|
||||||
|
|
||||||
|
# Local files
|
||||||
.idea/
|
.idea/
|
||||||
bin/
|
bin/
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.zip
|
*.zip
|
||||||
|
|
||||||
|
# pytest-ansible and tox-ansible
|
||||||
|
collections/
|
||||||
|
kubevirt.core
|
||||||
|
|
||||||
# Collection specific ignores
|
# Collection specific ignores
|
||||||
/changelogs/.plugin-cache.yaml
|
/changelogs/.plugin-cache.yaml
|
||||||
/tests/output/
|
/tests/output/
|
||||||
|
|||||||
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"ms-python.python",
|
||||||
|
"ms-python.debugpy",
|
||||||
|
"ms-python.vscode-pylance",
|
||||||
|
"github.vscode-github-actions"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
.vscode/settings.json
vendored
Normal file
7
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"python.testing.pytestArgs": [
|
||||||
|
"tests"
|
||||||
|
],
|
||||||
|
"python.testing.unittestEnabled": false,
|
||||||
|
"python.testing.pytestEnabled": true
|
||||||
|
}
|
||||||
21
Makefile
21
Makefile
@@ -7,3 +7,24 @@ cluster-up:
|
|||||||
.PHONY: cluster-down
|
.PHONY: cluster-down
|
||||||
cluster-down:
|
cluster-down:
|
||||||
hack/e2e-setup.sh --cleanup
|
hack/e2e-setup.sh --cleanup
|
||||||
|
|
||||||
|
.PHONY: build-venv
|
||||||
|
build-venv:
|
||||||
|
tox run -e venv
|
||||||
|
ln -sf .tox/venv .venv
|
||||||
|
|
||||||
|
.PHONY: format
|
||||||
|
format:
|
||||||
|
tox run -e format
|
||||||
|
|
||||||
|
.PHONY: test-sanity
|
||||||
|
test-sanity:
|
||||||
|
tox -f sanity --ansible -p auto --conf tox-ansible.ini
|
||||||
|
|
||||||
|
.PHONY: test-unit
|
||||||
|
test-unit:
|
||||||
|
tox -f unit --ansible -p auto --conf tox-ansible.ini
|
||||||
|
|
||||||
|
.PHONY: test-integration
|
||||||
|
test-integration:
|
||||||
|
tox -f integration --ansible --conf tox-ansible.ini
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ build_ignore:
|
|||||||
- .git
|
- .git
|
||||||
- .gitignore
|
- .gitignore
|
||||||
- .github
|
- .github
|
||||||
|
- .vscode
|
||||||
- .yamllint
|
- .yamllint
|
||||||
- bin
|
- bin
|
||||||
- changelogs
|
- changelogs
|
||||||
@@ -35,6 +36,7 @@ build_ignore:
|
|||||||
- Makefile
|
- Makefile
|
||||||
- OWNERS
|
- OWNERS
|
||||||
- REVIEW_CHECKLIST.md
|
- REVIEW_CHECKLIST.md
|
||||||
|
- tox.ini
|
||||||
- '*.tar.gz'
|
- '*.tar.gz'
|
||||||
- '*.zip'
|
- '*.zip'
|
||||||
- docs/_gh_include
|
- docs/_gh_include
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
kubernetes-validate
|
|
||||||
coverage==4.5.4
|
|
||||||
mock
|
|
||||||
pytest
|
pytest
|
||||||
pytest-xdist
|
|
||||||
pytest-mock
|
|
||||||
pytest-forked
|
|
||||||
virtualenv
|
|
||||||
pytest-ansible
|
pytest-ansible
|
||||||
|
pytest-xdist
|
||||||
|
tox-ansible
|
||||||
|
|||||||
2
tests/requirements.txt
Normal file
2
tests/requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# No additional requirements at this moment
|
||||||
|
# Have a look at /requirements.txt and /test-requirements.txt
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
jinja2
|
|
||||||
jsonpatch
|
|
||||||
kubernetes>=28.1.0
|
|
||||||
PyYAML>=3.11
|
|
||||||
pytest
|
|
||||||
0
tox-ansible.ini
Normal file
0
tox-ansible.ini
Normal file
22
tox.ini
Normal file
22
tox.ini
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
[tox]
|
||||||
|
env_list = venv
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
download = True
|
||||||
|
deps =
|
||||||
|
-r requirements.txt
|
||||||
|
-r test-requirements.txt
|
||||||
|
-r tests/requirements.txt
|
||||||
|
allowlist_externals =
|
||||||
|
mkdir
|
||||||
|
ln
|
||||||
|
commands =
|
||||||
|
mkdir -p "{env_site_packages_dir}/ansible_collections/kubevirt"
|
||||||
|
ln -sf "{tox_root}" "{env_site_packages_dir}/ansible_collections/kubevirt/core"
|
||||||
|
ansible-galaxy collection install -r requirements.yml -p "{env_site_packages_dir}/ansible_collections" --force
|
||||||
|
|
||||||
|
[testenv:format]
|
||||||
|
deps =
|
||||||
|
black
|
||||||
|
commands = black .
|
||||||
|
|
||||||
Reference in New Issue
Block a user