forked from xlwings/xlwings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci_test.py
17 lines (14 loc) · 905 Bytes
/
ci_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import subprocess
from shlex import split
import glob
os.chdir('Package')
# Version numbers get sometimes normalized from setuptools, so just check what package is in the directory
for package in glob.glob('*.tar.gz'):
# Installation
subprocess.check_call(split(f'python -m pip install {package}'))
# Changing the dir is required to prevent python from importing the package from the source code
os.chdir(os.path.expanduser('~')) # e.g. /Users/runners
print(subprocess.run(split('python -c "import xlwings;print(xlwings.__version__)"'), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8'))
print(subprocess.run(split('xlwings quickstart testproject1'), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8'))
print(subprocess.run(split('xlwings quickstart testproject2 --standalone'), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8'))