From a7d1cc7f428adfb8cb897cca82a5f6801311068e Mon Sep 17 00:00:00 2001 From: Tullio Sebastiani Date: Mon, 16 Sep 2024 10:43:27 +0200 Subject: [PATCH] gihub action update Signed-off-by: Tullio Sebastiani action update Signed-off-by: Tullio Sebastiani delta on test Signed-off-by: Tullio Sebastiani --- .github/workflows/build.yaml | 8 ++++++-- src/krkn_lib/tests/test_krkn_kubernetes.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 241a0d0e..7e7b2d10 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -80,10 +80,14 @@ jobs: --set security.tls.autoGenerated=true - name: Check out code uses: actions/checkout@v3 + with: + fetch-depth: 0 + fetch-tags: true - name: Update version number - if: startsWith(github.ref, 'refs/tags/') run: | - sed -i -e "s/0.0.0/${GITHUB_REF##*/}/" pyproject.toml + # always replaces the version with the latest tag + # both for testing and version release + sed -i -e "s/0.0.0/$(git describe --tags --abbrev=0 | sed 's/^v//')/" pyproject.toml - name: Set up Python uses: actions/setup-python@v4 with: diff --git a/src/krkn_lib/tests/test_krkn_kubernetes.py b/src/krkn_lib/tests/test_krkn_kubernetes.py index ee0009f1..89e716a3 100644 --- a/src/krkn_lib/tests/test_krkn_kubernetes.py +++ b/src/krkn_lib/tests/test_krkn_kubernetes.py @@ -1409,7 +1409,7 @@ def test_deploy_syn_flood(self): first=end - start, second=test_duration, places=None, - delta=1.7, + delta=2, ) def test_select_services_by_label(self):