gifn-apply: add a "reuse" Tox environment to the first stage
We have already prepared the grounds for checking the SPDX
copyright and license tags using the reuse tool; let's invoke it.
Also, actually add the .gitignore file that will help reuse
ignore test artifacts.
Change-Id: Id623c2a2d5d378d1bb427b62b1431d2cbb08a395
diff --git a/tools/git-if-needed/.gitignore b/tools/git-if-needed/.gitignore
new file mode 100644
index 0000000..70ba068
--- /dev/null
+++ b/tools/git-if-needed/.gitignore
@@ -0,0 +1,7 @@
+# SPDX-FileCopyrightText: StorPool <support@storpool.com>
+# SPDX-License-Identifier: BSD-2-Clause
+
+.tox
+
+**/*.egg-info
+**/__pycache__
diff --git a/tools/git-if-needed/pyproject.toml b/tools/git-if-needed/pyproject.toml
index 894660d..ce37834 100644
--- a/tools/git-if-needed/pyproject.toml
+++ b/tools/git-if-needed/pyproject.toml
@@ -68,4 +68,4 @@
]
[tool.test-stages]
-stages = ["ruff and not @manual", "@check and not @manual", "@tests and not @manual"]
+stages = ["@check and @quick and not @manual", "@check and not @manual", "@tests and not @manual"]
diff --git a/tools/git-if-needed/tox.ini b/tools/git-if-needed/tox.ini
index 01db844..4ab9aff 100644
--- a/tools/git-if-needed/tox.ini
+++ b/tools/git-if-needed/tox.ini
@@ -71,6 +71,7 @@
skip_install = True
tags =
check
+ quick
deps =
-r python/requirements/ruff.txt
commands =
@@ -84,6 +85,16 @@
commands =
pytest {posargs} python/unit_tests
+[testenv:reuse]
+skip_install = True
+tags =
+ check
+ quick
+deps =
+ reuse >= 2, < 3
+commands =
+ reuse --root={toxinidir} lint
+
[testenv:functional-cinder]
tags =
tests