From 1c888e21cea275290e6d965e076378e132a0f90b Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 3 Sep 2024 20:51:15 +0200 Subject: [PATCH] ci/fix(test-using-pytest): ensure hatch is always installed when needed --- .github/workflows/test-using-pytest.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-using-pytest.yml b/.github/workflows/test-using-pytest.yml index 2817922e..0ca8ec03 100644 --- a/.github/workflows/test-using-pytest.yml +++ b/.github/workflows/test-using-pytest.yml @@ -72,16 +72,19 @@ jobs: - name: "Build example volume" run: | cd examples/volumes && bash build_squashfs.sh - + # Unit tests create and delete network interfaces, and therefore require to run as root - name: Run unit tests run: | sudo python3 -m pip install hatch hatch-vcs coverage sudo hatch run testing:cov + - name: Output modules used and their version if: always() run: | - sudo hatch -e testing run pip freeze + # re-install hatch in case previous job failed and hatch didn't get installed + sudo python3 -m pip install hatch hatch-vcs coverage + sudo hatch -e testing run pip freeze - name: Upload coverage reports to Codecov @@ -107,4 +110,4 @@ jobs: - name: Run Shellcheck on all shell scripts run: | find ./ -type f -name "*.sh" -exec shellcheck {} \; - +