|
| 1 | +name: build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + windows: |
| 11 | + runs-on: windows-latest |
| 12 | + timeout-minutes: 10 |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + python-version: [3.6, 3.7, 3.8] |
| 17 | + arch: ['x64', 'x86'] |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + with: |
| 22 | + submodules: true |
| 23 | + |
| 24 | + - name: Set up Python ${{ matrix.python-version }} |
| 25 | + uses: actions/setup-python@v2 |
| 26 | + with: |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + architecture: ${{ matrix.arch }} |
| 29 | + |
| 30 | + - name: Install package and dependencies |
| 31 | + run: | |
| 32 | + python -m pip install -U pip |
| 33 | + python -m pip install pytest coverage pytest-cov |
| 34 | + python -m pip install . -v |
| 35 | + python -m pip install git+https://github.com/pydicom/pylibjpeg-data |
| 36 | +
|
| 37 | + - name: Run pytest |
| 38 | + run: | |
| 39 | + pytest --cov libjpeg |
| 40 | +
|
| 41 | + - name: Install pydicom release and rerun pytest |
| 42 | + run: | |
| 43 | + pip install pydicom |
| 44 | + pytest --cov libjpeg |
| 45 | +
|
| 46 | + osx: |
| 47 | + runs-on: macos-latest |
| 48 | + timeout-minutes: 10 |
| 49 | + strategy: |
| 50 | + fail-fast: false |
| 51 | + matrix: |
| 52 | + python-version: [3.6, 3.7, 3.8] |
| 53 | + |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v2 |
| 56 | + with: |
| 57 | + submodules: true |
| 58 | + |
| 59 | + - name: Set up Python ${{ matrix.python-version }} |
| 60 | + uses: actions/setup-python@v2 |
| 61 | + with: |
| 62 | + python-version: ${{ matrix.python-version }} |
| 63 | + |
| 64 | + - name: Install package and dependencies |
| 65 | + run: | |
| 66 | + python -m pip install -U pip |
| 67 | + python -m pip install . -v |
| 68 | + python -m pip install pytest coverage pytest-cov |
| 69 | + python -m pip install git+https://github.com/pydicom/pylibjpeg-data |
| 70 | +
|
| 71 | + - name: Run pytest |
| 72 | + run: | |
| 73 | + pytest --cov libjpeg |
| 74 | +
|
| 75 | + - name: Install pydicom release and rerun pytest |
| 76 | + run: | |
| 77 | + pip install pydicom |
| 78 | + pytest --cov libjpeg |
| 79 | +
|
| 80 | + ubuntu: |
| 81 | + runs-on: ubuntu-latest |
| 82 | + timeout-minutes: 10 |
| 83 | + strategy: |
| 84 | + fail-fast: false |
| 85 | + matrix: |
| 86 | + python-version: [3.6, 3.7, 3.8] |
| 87 | + |
| 88 | + steps: |
| 89 | + - uses: actions/checkout@v2 |
| 90 | + with: |
| 91 | + submodules: true |
| 92 | + |
| 93 | + - name: Set up Python ${{ matrix.python-version }} |
| 94 | + uses: actions/setup-python@v2 |
| 95 | + with: |
| 96 | + python-version: ${{ matrix.python-version }} |
| 97 | + |
| 98 | + - name: Install package and dependencies |
| 99 | + run: | |
| 100 | + python -m pip install -U pip |
| 101 | + python -m pip install . |
| 102 | + python -m pip install pytest coverage pytest-cov |
| 103 | + python -m pip install git+https://github.com/pydicom/pylibjpeg-data |
| 104 | +
|
| 105 | + - name: Run pytest |
| 106 | + run: | |
| 107 | + pytest --cov libjpeg |
| 108 | +
|
| 109 | + - name: Install pydicom release and rerun pytest |
| 110 | + run: | |
| 111 | + pip install pydicom |
| 112 | + pytest --cov libjpeg |
| 113 | +
|
| 114 | + - name: Switch to pydicom dev and rerun pytest |
| 115 | + run: | |
| 116 | + pip uninstall -y pydicom |
| 117 | + pip install git+https://github.com/pydicom/pydicom |
| 118 | + pytest --cov libjpeg |
| 119 | +
|
| 120 | + - name: Send coverage results |
| 121 | + if: ${{ success() }} |
| 122 | + run: | |
| 123 | + bash <(curl --connect-timeout 10 --retry 10 --retry-max-time \ |
| 124 | + 0 https://codecov.io/bash) || (sleep 30 && bash <(curl \ |
| 125 | + --connect-timeout 10 --retry 10 --retry-max-time \ |
| 126 | + 0 https://codecov.io/bash)) |
0 commit comments