-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (52 loc) · 1.37 KB
/
build_python.yaml
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
57
58
59
60
61
62
name: Build and Test
on:
push:
branches:
- master
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.11]
tensorflow-version: [2.13, 2.15]
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history to ensure tags are available
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
# Build the package
- name: Build the package
run: |
python -m build
# Install tensorflow
- name: Install tensorflow
run: |
pip install tensorflow==${{ matrix.tensorflow-version }}
# Install the package
- name: Install the package
run: |
pip install dist/*.whl
# Run tests
- name: Run tests
run: |
pip install pytest
pytest -vv tests
# Test entry points
- name: Test entry points
run: |
pyapetnet_list_models
pyapetnet_predict_from_nifti -h
pyapetnet_predict_from_dicom -h