|
| 1 | +--- |
1 | 2 | name: CI
|
2 | 3 |
|
3 | 4 | on: [push, pull_request]
|
4 | 5 |
|
5 | 6 | jobs:
|
6 |
| - Windows: |
| 7 | + lint: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + |
| 10 | + steps: |
| 11 | + - name: Checkout Repository |
| 12 | + uses: actions/checkout@v1 |
| 13 | + - name: Set up Python 3.7 |
| 14 | + uses: actions/setup-python@v1 |
| 15 | + with: |
| 16 | + python-version: 3.7 |
| 17 | + - name: Install dependencies |
| 18 | + run: | |
| 19 | + python3.7 -m pip install nox |
| 20 | + - name: Lint the code |
| 21 | + run: nox -s lint |
| 22 | + |
| 23 | + docs: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + |
| 26 | + steps: |
| 27 | + - name: Checkout Repository |
| 28 | + uses: actions/checkout@v1 |
| 29 | + - name: Set up Python 3.7 |
| 30 | + uses: actions/setup-python@v1 |
| 31 | + with: |
| 32 | + python-version: 3.7 |
| 33 | + - name: Install dependencies |
| 34 | + run: | |
| 35 | + python3.7 -m pip install nox |
| 36 | + - name: Build the docs |
| 37 | + run: nox -s docs |
| 38 | + |
| 39 | + macOS: |
| 40 | + runs-on: macos-latest |
| 41 | + |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + python-version: [2.7, 3.5, 3.6, 3.7, 3.8] |
7 | 46 |
|
| 47 | + steps: |
| 48 | + - name: Checkout Repository |
| 49 | + uses: actions/checkout@v1 |
| 50 | + - name: Set Up Python 3.7 to run nox |
| 51 | + uses: actions/setup-python@v1 |
| 52 | + with: |
| 53 | + python-version: 3.7 |
| 54 | + - name: Set Up Python - ${{ matrix.python-version }} |
| 55 | + if: matrix.python_version != '3.7' |
| 56 | + uses: actions/setup-python@v1 |
| 57 | + with: |
| 58 | + python-version: ${{ matrix.python-version }} |
| 59 | + - name: Install Dependencies |
| 60 | + run: | |
| 61 | + python3.7 -m pip install --upgrade nox |
| 62 | + - name: Run Tests |
| 63 | + run: | |
| 64 | + nox -s test-${{ matrix.python-version }} |
| 65 | + - name: Upload Coverage |
| 66 | + uses: codecov/codecov-action@v1 |
| 67 | + with: |
| 68 | + token: 3bb38a90-137e-4efe-9627-ca66de472c13 |
| 69 | + file: ./coverage.xml |
| 70 | + flags: unittests |
| 71 | + name: codecov-umbrella |
| 72 | + yml: ./codecov.yml |
| 73 | + fail_ci_if_error: true |
| 74 | + |
| 75 | + Windows: |
8 | 76 | runs-on: windows-latest
|
| 77 | + |
9 | 78 | strategy:
|
10 | 79 | fail-fast: false
|
11 | 80 | matrix:
|
12 | 81 | python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
|
13 | 82 |
|
14 | 83 | steps:
|
15 |
| - - uses: actions/checkout@v1 |
16 |
| - - name: Set up Python 3.7 to run nox |
17 |
| - uses: actions/setup-python@v1 |
18 |
| - with: |
19 |
| - python-version: 3.7 |
20 |
| - - name: Set up Python ${{ matrix.python-version }} |
21 |
| - if: matrix.python_version != '3.7' |
22 |
| - uses: actions/setup-python@v1 |
23 |
| - with: |
24 |
| - python-version: ${{ matrix.python-version }} |
25 |
| - - name: Install dependencies |
26 |
| - run: | |
27 |
| - # Work around https://github.com/theacodes/nox/issues/250 |
28 |
| - Remove-Item C:\ProgramData\Chocolatey\bin\python2.7.exe |
29 |
| - py -3.7 -m pip install nox |
30 |
| - - name: Test |
31 |
| - run: | |
32 |
| - nox -s test-${{ matrix.python-version }} |
33 |
| - - name: Coverage upload |
34 |
| - env: |
35 |
| - CODECOV_TOKEN: 3bb38a90-137e-4efe-9627-ca66de472c13 |
36 |
| - run: | |
37 |
| - python.exe -m pip install codecov |
38 |
| - python.exe -m codecov -f coverage.xml |
| 84 | + - name: Checkout Repository |
| 85 | + uses: actions/checkout@v1 |
| 86 | + - name: Set Up Python 3.7 to run nox |
| 87 | + uses: actions/setup-python@v1 |
| 88 | + with: |
| 89 | + python-version: 3.7 |
| 90 | + - name: Set Up Python - ${{ matrix.python-version }} |
| 91 | + if: matrix.python_version != '3.7' |
| 92 | + uses: actions/setup-python@v1 |
| 93 | + with: |
| 94 | + python-version: ${{ matrix.python-version }} |
| 95 | + - name: Install dependencies (Windows) |
| 96 | + run: | |
| 97 | + # Work around https://github.com/theacodes/nox/issues/250 |
| 98 | + Remove-Item C:\ProgramData\Chocolatey\bin\python2.7.exe |
| 99 | + py -3.7 -m pip install nox |
| 100 | + - name: Run Tests |
| 101 | + run: | |
| 102 | + nox -s test-${{ matrix.python-version }} |
| 103 | + - name: Upload Coverage |
| 104 | + uses: codecov/codecov-action@v1 |
| 105 | + with: |
| 106 | + token: 3bb38a90-137e-4efe-9627-ca66de472c13 |
| 107 | + file: ./coverage.xml |
| 108 | + flags: unittests |
| 109 | + name: codecov-umbrella |
| 110 | + yml: ./codecov.yml |
| 111 | + fail_ci_if_error: true |
0 commit comments