|
4 | 4 | name: scvi-tools
|
5 | 5 |
|
6 | 6 | on:
|
7 |
| - push: |
8 |
| - branches: [master, 0.15.x, 0.16.x, 0.17.x, 0.18.x] |
9 |
| - pull_request: |
10 |
| - branches: [master, 0.15.x, 0.16.x, 0.17.x, 0.18.x] |
| 7 | + push: |
| 8 | + branches: [master, 0.15.x, 0.16.x, 0.17.x, 0.18.x] |
| 9 | + pull_request: |
| 10 | + branches: [master, 0.15.x, 0.16.x, 0.17.x, 0.18.x] |
11 | 11 |
|
12 | 12 | jobs:
|
13 |
| - build: |
14 |
| - runs-on: ubuntu-latest |
15 |
| - timeout-minutes: 20 |
16 |
| - strategy: |
17 |
| - matrix: |
18 |
| - python-version: ["3.7", "3.8", "3.9", "3.10"] |
| 13 | + build: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + timeout-minutes: 20 |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: ["3.7", "3.8", "3.9", "3.10"] |
19 | 19 |
|
20 |
| - steps: |
21 |
| - - uses: actions/checkout@v2 |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
22 | 22 |
|
23 |
| - - name: Set up Python ${{ matrix.python-version }} |
24 |
| - uses: actions/setup-python@v2 |
25 |
| - with: |
26 |
| - python-version: ${{ matrix.python-version }} |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + uses: actions/setup-python@v2 |
| 25 | + with: |
| 26 | + python-version: ${{ matrix.python-version }} |
27 | 27 |
|
28 |
| - - name: Cache pip |
29 |
| - uses: actions/cache@v2 |
30 |
| - with: |
31 |
| - path: ~/.cache/pip |
32 |
| - key: ${{ runner.os }}-pip-v1-${{ hashFiles('**/requirements.txt') }} |
33 |
| - restore-keys: | |
34 |
| - ${{ runner.os }}-pip-v1- |
| 28 | + - name: Cache pip |
| 29 | + uses: actions/cache@v2 |
| 30 | + with: |
| 31 | + path: ~/.cache/pip |
| 32 | + key: ${{ runner.os }}-pip-v1-${{ hashFiles('**/requirements.txt') }} |
| 33 | + restore-keys: | |
| 34 | + ${{ runner.os }}-pip-v1- |
35 | 35 |
|
36 |
| - - name: Install dependencies |
37 |
| - id: dependencies |
38 |
| - run: | |
39 |
| - pip install pytest-cov |
40 |
| - pip install .[dev,pymde] |
| 36 | + - name: Install dependencies |
| 37 | + id: dependencies |
| 38 | + run: | |
| 39 | + pip install pytest-cov |
| 40 | + pip install .[dev,pymde] |
41 | 41 |
|
42 |
| - # Following checks are independent and are run even if one fails |
43 |
| - - name: Lint with flake8 |
44 |
| - run: | |
45 |
| - flake8 |
46 |
| - if: ${{ steps.dependencies.outcome == 'success' && always() }} |
| 42 | + # Following checks are independent and are run even if one fails |
| 43 | + - name: Lint with flake8 |
| 44 | + run: | |
| 45 | + flake8 |
| 46 | + if: ${{ steps.dependencies.outcome == 'success' && always() }} |
47 | 47 |
|
48 |
| - - name: Format with black |
49 |
| - run: | |
50 |
| - black --check . |
51 |
| - if: ${{ steps.dependencies.outcome == 'success' && always() }} |
| 48 | + - name: Format with black |
| 49 | + run: | |
| 50 | + black --check . |
| 51 | + if: ${{ steps.dependencies.outcome == 'success' && always() }} |
52 | 52 |
|
53 |
| - - name: Import sort |
54 |
| - run: | |
55 |
| - isort --check-only . |
56 |
| - if: ${{ steps.dependencies.outcome == 'success' && always() }} |
| 53 | + - name: Import sort |
| 54 | + run: | |
| 55 | + isort --check-only . |
| 56 | + if: ${{ steps.dependencies.outcome == 'success' && always() }} |
57 | 57 |
|
58 |
| - - name: Test with pytest |
59 |
| - run: | |
60 |
| - pytest --cov-report=xml --cov=scvi --internet-tests --color=yes |
61 |
| - if: ${{ steps.dependencies.outcome == 'success' && always() }} |
62 |
| - # -------------------------------------------------------------- |
| 58 | + - name: Test with pytest |
| 59 | + run: | |
| 60 | + pytest --cov-report=xml --cov=scvi --internet-tests --color=yes |
| 61 | + if: ${{ steps.dependencies.outcome == 'success' && always() }} |
| 62 | + # -------------------------------------------------------------- |
63 | 63 |
|
64 |
| - - name: After success |
65 |
| - run: | |
66 |
| - codecov |
67 |
| - pip list |
| 64 | + - name: After success |
| 65 | + run: | |
| 66 | + codecov |
| 67 | + pip list |
68 | 68 |
|
69 |
| - - name: Codacy upload |
70 |
| - env: |
71 |
| - CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |
72 |
| - run: | |
73 |
| - bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Python -r coverage.xml |
74 |
| - continue-on-error: true |
| 69 | + - name: Codacy upload |
| 70 | + env: |
| 71 | + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |
| 72 | + run: | |
| 73 | + bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Python -r coverage.xml |
| 74 | + continue-on-error: true |
0 commit comments