Skip to content

vmsdk/python/tests: add tests for TDX #33

vmsdk/python/tests: add tests for TDX

vmsdk/python/tests: add tests for TDX #33

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
# Set PYTHONDONTWRITEBYTECODE and --no-cacheprovider to prevent
# generated some intermediate files by root. Othwerwise, these
# files will fail the action/checkout in the next round of running
# due to the permission issue.
sudo su -c "source setupenv.sh && \
pushd vmsdk/python/tests && \
export PYTHONDONTWRITEBYTECODE=1 && \
./run.sh --no-cacheprovider True && \
popd"