test: add minimal import tests

This commit is contained in:
Xuehai Pan 2023-03-15 09:30:40 +00:00
parent 80b9d6f75c
commit 48f05a3dec
2 changed files with 14 additions and 1 deletions

View file

@ -75,7 +75,12 @@ jobs:
python -m pip install --upgrade pip setuptools pre-commit pylint[spelling]
python -m pip install -r requirements.txt &&
python -m pre_commit install --install-hooks &&
python -m pre_commit run --all-files
python -m pre_commit run --all-files &&
python -c 'import nvitop' &&
python -m nvitop --version &&
python -m nvitop --help &&
python -m nvitop.select --version &&
python -m nvitop.select --help
)
- name: Test docker build

View file

@ -49,6 +49,14 @@ jobs:
run: |
python -m pip install -r requirements.txt
- name: Import tests
run: |
python -c 'import nvitop'
python -m nvitop --version
python -m nvitop --help
python -m nvitop.select --version
python -m nvitop.select --help
- name: Install linters
run: |
python -m pip install --upgrade pre-commit pylint[spelling]