From a690b2ca4a6eeb821d3a3ba5c5e8dccf578018ff Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 29 Jan 2024 18:07:23 +0100 Subject: [PATCH 1/3] Pin black version in tox.ini to 23.12.1 Change-Id: I7b01dffe4f4ac592ef2f01c7dfec27cfaa2c808a Signed-off-by: garciadeblas --- .../pin_black_version-0e9543b7003d9774.yaml | 21 +++++++++++++++++++ tox.ini | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml diff --git a/releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml b/releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml new file mode 100644 index 0000000..476dd72 --- /dev/null +++ b/releasenotes/notes/pin_black_version-0e9543b7003d9774.yaml @@ -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..b648ff1 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ deps = -r{toxinidir}/requirements.txt ####################################################################################### [testenv:black] -deps = black +deps = black==23.12.1 skip_install = true commands = black --check --diff osm_common/ -- 2.25.1 From da67e4753b122698302e22ff36232e60fabe6193 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 9 Apr 2024 17:36:51 +0200 Subject: [PATCH 2/3] Disable the check of release notes This change also moves the checking of release notes from stage-test.sh to stage-releasenote.sh Change-Id: Ie12290d8aaa9ee057889e4949ccb6c42dffe2cd0 Signed-off-by: garciadeblas --- devops-stages/stage-releasenote.sh | 33 ++++++++++++++++++++++++++++++ devops-stages/stage-test.sh | 15 ++------------ 2 files changed, 35 insertions(+), 13 deletions(-) create mode 100755 devops-stages/stage-releasenote.sh diff --git a/devops-stages/stage-releasenote.sh b/devops-stages/stage-releasenote.sh new file mode 100755 index 0000000..983b810 --- /dev/null +++ b/devops-stages/stage-releasenote.sh @@ -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 ''" + 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" diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 8c684dd..276d0d3 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -12,18 +12,7 @@ # 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 ''" - 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" + -- 2.25.1 From 409397d74a1a9dd1257a55b6c9ae02a7b8bf1bdd Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 9 Apr 2024 17:33:37 +0200 Subject: [PATCH 3/3] Enable parallel execution and output of tox env Change-Id: Id16a89fe150c344298c317fb27874e42c1ef4876 Signed-off-by: garciadeblas --- devops-stages/stage-test.sh | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 276d0d3..c9360d5 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -14,5 +14,5 @@ # limitations under the License. echo Launching tox -tox --parallel=auto +TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto diff --git a/tox.ini b/tox.ini index b648ff1..ddb7f9a 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,7 @@ basepython = python3.10 setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 deps = -r{toxinidir}/requirements.txt - +parallel_show_output = true ####################################################################################### [testenv:black] -- 2.25.1