|
17 | 17 |
|
18 | 18 | jobs: |
19 | 19 | build_test: |
20 | | - name: Build and Test on Python ${{ matrix.python-version }} and ${{ matrix.os }} |
| 20 | + name: Build on Python ${{ matrix.python-version }} using ${{ matrix.os }} |
21 | 21 | runs-on: ${{ matrix.os }} |
22 | 22 | strategy: |
23 | 23 | matrix: |
24 | | - python-version: ['3.5', '3.6', '3.7', '3.8'] |
25 | | - os: [ubuntu-latest] |
| 24 | + python-version: ['3.6', '3.7', '3.8'] |
| 25 | + os: [ubuntu-latest, windows-latest] |
| 26 | + exclude: |
| 27 | + - os: windows-latest |
| 28 | + python-version: '3.6' |
| 29 | + - os: windows-latest |
| 30 | + python-version: '3.7' |
26 | 31 |
|
27 | 32 | steps: |
28 | 33 | - uses: actions/checkout@v2 |
29 | 34 | - name: Set up Python |
30 | 35 | uses: actions/setup-python@v2 |
31 | 36 | with: |
32 | 37 | python-version: ${{ matrix.python-version }} |
33 | | - - name: Install dependencies |
| 38 | + - name: Install dependencies (ubuntu) |
| 39 | + if: matrix.os == 'ubuntu-latest' |
34 | 40 | run: | |
35 | 41 | pip3 install -r requirements.txt |
36 | | - pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver |
| 42 | + pip3 install -r requirements-dev.txt |
37 | 43 | pip3 install --editable . |
38 | | - - name: Execute Python unit tests for code coverage |
39 | | - if: matrix.python-version == '3.5' |
| 44 | + - name: Install dependencies (windows) |
| 45 | + if: matrix.os == 'windows-latest' |
| 46 | + run: | |
| 47 | + pip3 install -r requirements.txt --use-deprecated=legacy-resolver |
| 48 | + pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver |
| 49 | + pip3 install --editable . --use-deprecated=legacy-resolver |
| 50 | + - name: Execute Python 3.6/3.7 unit tests |
| 51 | + if: matrix.python-version != '3.8' |
| 52 | + run: | |
| 53 | + pip3 install -U python-dotenv |
| 54 | + py.test test/unit |
| 55 | + - name: Execute Python 3.8 unit tests (windows) |
| 56 | + if: matrix.os == 'windows-latest' |
40 | 57 | run: | |
41 | 58 | pip3 install -U python-dotenv |
42 | | - py.test --reruns 3 --cov=ibm_watson |
| 59 | + py.test test/unit --reruns 3 |
| 60 | + - name: Execute Python 3.8 unit tests (ubuntu) |
| 61 | + if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest' |
| 62 | + run: | |
| 63 | + pip3 install -U python-dotenv |
| 64 | + py.test test/unit --reruns 3 --cov=ibm_watson |
43 | 65 | - name: Upload coverage to Codecov |
44 | | - if: matrix.python-version == '3.5' |
| 66 | + if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest' |
45 | 67 | uses: codecov/codecov-action@v1 |
46 | 68 | with: |
47 | 69 | name: py${{ matrix.python-version }}-${{ matrix.os }} |
48 | | - - name: Execute Python unit tests |
49 | | - if: matrix.python-version != '3.5' |
50 | | - run: | |
51 | | - pip3 install -U python-dotenv |
52 | | - py.test |
|
0 commit comments