-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (56 loc) · 2.01 KB
/
github-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: GitHub CI
on: [pull_request]
env:
PACKAGE_VERSION: $(python setup.py --version)
jobs:
Run-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-18.04, ubuntu-20.04, macos-11, macos-10.15]
os: [ubuntu-20.04, macos-11]
python-version: ['3.6','3.9']
steps:
- uses: actions/checkout@v2
- uses: kenchan0130/actions-system-info@master
id: system-info
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Check outputs
run: |
OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory bytes: ${{ steps.system-info.outputs.totalmem }}"
)
IS_EMPTY_OUTOUT=false
for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
OUT=$(echo ${OUTPUT} | cut -d ':' -f2- | xargs)
if [[ -z "${OUT}" ]];then
IS_EMPTY_OUTOUT=true
fi
done
if "$IS_EMPTY_OUTOUT";then
exit 1
fi
- run: python --version
- run: pip --version
- run: pip install wheel
- run: python setup.py bdist_wheel
- run: |
if [ ${{ matrix.python-version }} == '3.9' ];
then
pip install dist/dataqa-${{ env.PACKAGE_VERSION }}-py3-none-any.whl --use-deprecated=legacy-resolver
else
pip install dist/dataqa-${{ env.PACKAGE_VERSION }}-py3-none-any.whl
fi
- run: pip show dataqa
- run: dataqa test