-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (59 loc) · 1.86 KB
/
Copy pathunit-tests.yml
File metadata and controls
64 lines (59 loc) · 1.86 KB
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
63
64
name: Unit tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Start Orthanc
run: docker-compose -f docker-compose.yml up -d orthanc
- name: Install Tox and build dependencies
run: |
pip install .
pip install tox tox-gh-actions
- name: Wait for Orthanc
run: |
ORTHANC_PORT=4242
MAX_ITERATIONS=60
ITERATIONS=0
until python -m pynetdicom echoscu localhost $ORTHANC_PORT > /dev/null 2>&1 || (($ITERATIONS >= $MAX_ITERATIONS)); do
>&2 echo "Waiting on Orthanc to be ready..."
ITERATIONS=$(( ITERATIONS + 1 ))
echo $ITERATIONS
sleep 1
done
# At this point, orthanc should be up - if not, halt
python -m pynetdicom echoscu localhost $ORTHANC_PORT
- name: Install DCMTK
run: |
sudo apt update
sudo apt install dcmtk
- name: Import Test DICOM Files
run: python3 pacsman/upload_test.py remote
- name: Run Tox
# Run tox using the version of Python in `PATH`
run: tox
package:
name: Check that binary and source distributions can be successfully formed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .