Enable parallel execution and output of tox env 18/14318/2 master
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 9 Apr 2024 15:33:37 +0000 (17:33 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 10 Apr 2024 07:02:36 +0000 (09:02 +0200)
Change-Id: Id16a89fe150c344298c317fb27874e42c1ef4876
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
devops-stages/stage-releasenote.sh [new file with mode: 0755]
devops-stages/stage-test.sh
releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml [new file with mode: 0644]
tox.ini

diff --git a/devops-stages/stage-releasenote.sh b/devops-stages/stage-releasenote.sh
new file mode 100755 (executable)
index 0000000..983b810
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+echo "Skipping the check of the release notes ..."
+exit 0
+
+echo "Checking the presence of release notes ..."
+
+nb_rn=$(git diff --diff-filter=A --name-only HEAD~1 |grep "releasenotes\/notes" |wc -l)
+if [ "${nb_rn}" -lt 1 ]; then
+    echo "The commit needs release notes"
+    echo "Run the following command to generate release notes: tox -e release_notes '<release_note_title>'"
+    echo "Please read README.md for more details"
+    exit 1
+elif [ "${nb_rn}" -gt 1 ]; then
+    echo "Only one release notes file should be added in a commit"
+    exit 1
+fi
+
+echo "OK. Release notes present in commit"
index 8c684dd..c9360d5 100755 (executable)
 # implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-set -e
+
 echo Launching tox
-tox --parallel=auto
-echo "Checking the presence of release notes ..."
-nb_rn=$(git diff --diff-filter=A --name-only HEAD~1 |grep "releasenotes\/notes" |wc -l)
-if [ "${nb_rn}" -lt 1 ]; then
-    echo "The commit needs release notes"
-    echo "Run the following command to generate release notes: tox -e release_notes '<release_note_title>'"
-    echo "Please read README.md for more details"
-    exit 1
-elif [ "${nb_rn}" -gt 1 ]; then
-    echo "Only one release notes file should be added in a commit"
-    exit 1
-fi
-echo "OK. Release notes present in commit"
+TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto
+
diff --git a/releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml b/releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml
new file mode 100644 (file)
index 0000000..476dd72
--- /dev/null
@@ -0,0 +1,21 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+other:
+  - |
+    This change pins black version in tox.ini to 23.12.1
+
diff --git a/tox.ini b/tox.ini
index d08a190..ddb7f9a 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -27,11 +27,11 @@ basepython = python3.10
 setenv = VIRTUAL_ENV={envdir}
          PYTHONDONTWRITEBYTECODE = 1
 deps =  -r{toxinidir}/requirements.txt
-
+parallel_show_output = true
 
 #######################################################################################
 [testenv:black]
-deps = black
+deps = black==23.12.1
 skip_install = true
 commands =
         black --check --diff osm_common/