Skip to content

Commit d01d4f8

Browse files
authored
Merge pull request #45 from KIBruh/main
Enhance CI with GitHub Actions for testing and detailed output
2 parents 6434e7f + a604d1e commit d01d4f8

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
tests:
9+
name: Tests
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.9'
18+
cache: pip
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install -e . pytest
24+
25+
- name: Install vcsim and govc
26+
run: |
27+
mkdir -p "$RUNNER_TEMP/govmomi-bin"
28+
curl -fsSL -o "$RUNNER_TEMP/vcsim.tar.gz" https://github.com/vmware/govmomi/releases/download/v0.53.1/vcsim_Linux_x86_64.tar.gz
29+
tar -xzf "$RUNNER_TEMP/vcsim.tar.gz" -C "$RUNNER_TEMP/govmomi-bin"
30+
curl -fsSL -o "$RUNNER_TEMP/govc.tar.gz" https://github.com/vmware/govmomi/releases/download/v0.53.1/govc_Linux_x86_64.tar.gz
31+
tar -xzf "$RUNNER_TEMP/govc.tar.gz" -C "$RUNNER_TEMP/govmomi-bin"
32+
chmod +x "$RUNNER_TEMP/govmomi-bin/vcsim" "$RUNNER_TEMP/govmomi-bin/govc"
33+
printf '%s\n' "$RUNNER_TEMP/govmomi-bin" >> "$GITHUB_PATH"
34+
35+
- name: Run test suite
36+
run: |
37+
pytest
38+
pytest --run-integration tests/integration_vcsim

0 commit comments

Comments
 (0)