Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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
pytest --run-integration tests/integration_vcsim
Loading