From 3032c94d53f80feaba3b9ed839811afa09be2f35 Mon Sep 17 00:00:00 2001 From: kibruh <268704792+KIBruh@users.noreply.github.com> Date: Thu, 7 May 2026 11:34:19 +0200 Subject: [PATCH 1/2] ci: add GitHub Actions test workflow Run unit and vcsim integration tests on every push and pull request so changes are validated in CI with the required govmomi simulator tools installed automatically. --- .github/workflows/tests.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3f4e02e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,38 @@ +name: Tests + +on: + push: + pull_request: + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + cache: pip + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e . pytest + + - name: Install vcsim and govc + run: | + mkdir -p "$RUNNER_TEMP/govmomi-bin" + curl -fsSL -o "$RUNNER_TEMP/vcsim.tar.gz" https://github.com/vmware/govmomi/releases/download/v0.53.1/vcsim_Linux_x86_64.tar.gz + tar -xzf "$RUNNER_TEMP/vcsim.tar.gz" -C "$RUNNER_TEMP/govmomi-bin" + curl -fsSL -o "$RUNNER_TEMP/govc.tar.gz" https://github.com/vmware/govmomi/releases/download/v0.53.1/govc_Linux_x86_64.tar.gz + tar -xzf "$RUNNER_TEMP/govc.tar.gz" -C "$RUNNER_TEMP/govmomi-bin" + chmod +x "$RUNNER_TEMP/govmomi-bin/vcsim" "$RUNNER_TEMP/govmomi-bin/govc" + printf '%s\n' "$RUNNER_TEMP/govmomi-bin" >> "$GITHUB_PATH" + + - name: Run test suite + run: | + pytest -q + pytest -q --run-integration tests/integration_vcsim From a604d1e131c4f029f7558c9c8bd09aafa624fd14 Mon Sep 17 00:00:00 2001 From: kibruh <268704792+KIBruh@users.noreply.github.com> Date: Thu, 7 May 2026 11:38:28 +0200 Subject: [PATCH 2/2] ci: use full pytest output in workflow Remove quiet mode from the GitHub Actions test commands so CI logs show the normal pytest session details when runs fail. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3f4e02e..d2c0cd9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,5 +34,5 @@ jobs: - name: Run test suite run: | - pytest -q - pytest -q --run-integration tests/integration_vcsim + pytest + pytest --run-integration tests/integration_vcsim