Skip to content

Commit ad45a39

Browse files
committed
CI: check pkg install
1 parent a8dfa73 commit ad45a39

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/ci-install-pkg.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Install package
2+
3+
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
4+
on: # Trigger the workflow on push or pull request, but only for the main branch
5+
push:
6+
branches: [master]
7+
pull_request: {}
8+
9+
jobs:
10+
pkg-check:
11+
runs-on: ubuntu-20.04
12+
13+
steps:
14+
- uses: actions/checkout@master
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.7
18+
19+
- name: Check package
20+
run: |
21+
pip install check-manifest
22+
check-manifest
23+
python setup.py check --metadata --strict
24+
25+
- name: Create package
26+
run: |
27+
pip install --upgrade setuptools wheel
28+
python setup.py sdist bdist_wheel
29+
30+
- name: Verify package
31+
run: |
32+
pip install twine==3.2
33+
twine check dist/*
34+
35+
pkg-install:
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: [ubuntu-20.04]
41+
python-version: [3.7, 3.9]
42+
43+
steps:
44+
- uses: actions/checkout@master
45+
- uses: actions/setup-python@v2
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
49+
- name: Create package
50+
run: |
51+
python setup.py sdist
52+
53+
- name: Install package
54+
run: |
55+
pip install dist/*
56+
cd .. & python -c "import med3d ; print(med3d.__version__)"

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def _load_requirements(path_dir=_PATH_ROOT, comment_char='#'):
3333
url=med3d.__homepage__,
3434
license=med3d.__license__,
3535
packages=find_packages(exclude=['tests', 'docs']),
36+
long_description_content_type='text/markdown',
3637
include_package_data=True,
3738
zip_safe=False,
3839
keywords=['deep learning', 'pytorch', 'AI'],

0 commit comments

Comments
 (0)