vmsdk/python/tests: add tests for TDX #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: VMSDK Python Test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'vmsdk/**/*.py' | |
pull_request: | |
paths: | |
- 'vmsdk/**/*.py' | |
workflow_dispatch: | |
jobs: | |
vmsdk_pytest: | |
runs-on: [self-hosted, tdx-guest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run PyTest for VMSDK | |
run: | | |
set -ex | |
# Don't write python bytecode. Othwerwise, the action/checkout | |
# will fail to delete the generated files. | |
sudo su -c "source setupenv.sh && pushd vmsdk/python/tests && \ | |
export PYTHONDONTWRITEBYTECODE=1 && python3 ./run.py && popd" |