|
23 | 23 | runs-on: ubuntu-latest
|
24 | 24 | outputs:
|
25 | 25 | catboost: ${{ steps.filter.outputs.catboost }}
|
| 26 | + diffusers: ${{ steps.filter.outputs.diffusers }} |
26 | 27 | fastai: ${{ steps.filter.outputs.fastai }}
|
27 | 28 | keras: ${{ steps.filter.outputs.keras }}
|
28 | 29 | lightgbm: ${{ steps.filter.outputs.lightgbm }}
|
|
56 | 57 | - src/bentoml/catboost.py
|
57 | 58 | - src/bentoml/_internal/frameworks/catboost.py
|
58 | 59 | - tests/integration/frameworks/models/catboost.py
|
| 60 | + diffusers: |
| 61 | + - *related |
| 62 | + - src/bentoml/diffusers.py |
| 63 | + - src/bentoml/_internal/frameworks/diffusers.py |
| 64 | + - tests/integration/frameworks/models/diffusers.py |
59 | 65 | lightgbm:
|
60 | 66 | - *related
|
61 | 67 | - src/bentoml/lightgbm.py
|
@@ -173,6 +179,51 @@ jobs:
|
173 | 179 | files: ./coverage.xml
|
174 | 180 | token: ${{ secrets.CODECOV_TOKEN }}
|
175 | 181 |
|
| 182 | + diffusers_integration_tests: |
| 183 | + needs: diff |
| 184 | + if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.diffusers == 'true') || github.event_name == 'push' }} |
| 185 | + runs-on: ubuntu-latest |
| 186 | + steps: |
| 187 | + - uses: actions/checkout@v3 |
| 188 | + with: |
| 189 | + fetch-depth: 0 # fetch all tags and branches |
| 190 | + - name: Setup python |
| 191 | + uses: actions/setup-python@v4 |
| 192 | + with: |
| 193 | + python-version: 3.8 |
| 194 | + |
| 195 | + - name: Get pip cache dir |
| 196 | + id: cache-dir |
| 197 | + run: | |
| 198 | + echo ::set-output name=dir::$(pip cache dir) |
| 199 | +
|
| 200 | + - name: Cache pip dependencies |
| 201 | + uses: actions/cache@v3 |
| 202 | + id: cache-pip |
| 203 | + with: |
| 204 | + path: ${{ steps.cache-dir.outputs.dir }} |
| 205 | + key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }} |
| 206 | + |
| 207 | + - name: Install dependencies |
| 208 | + run: | |
| 209 | + pip install . |
| 210 | + pip install diffusers torch transformers |
| 211 | + pip install -r requirements/tests-requirements.txt |
| 212 | +
|
| 213 | + - name: Run tests and generate coverage report |
| 214 | + run: | |
| 215 | + OPTS=(--cov-config pyproject.toml --cov src/bentoml --cov-append --framework diffusers) |
| 216 | + coverage run -m pytest tests/integration/frameworks/test_frameworks.py "${OPTS[@]}" |
| 217 | +
|
| 218 | + - name: Generate coverage |
| 219 | + run: coverage xml |
| 220 | + |
| 221 | + - name: Upload test coverage to Codecov |
| 222 | + uses: codecov/codecov-action@v3 |
| 223 | + with: |
| 224 | + files: ./coverage.xml |
| 225 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 226 | + |
176 | 227 | fastai_integration_tests:
|
177 | 228 | needs: diff
|
178 | 229 | if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.fastai == 'true') || github.event_name == 'push' }}
|
|
0 commit comments