|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + Windows: |
| 7 | + name: 'Windows (${{ matrix.python }})' |
| 8 | + runs-on: 'windows-latest' |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + python: ['3.7', '3.8', '3.9', '3.10'] |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v2 |
| 17 | + - name: Setup python |
| 18 | + uses: actions/setup-python@v2 |
| 19 | + with: |
| 20 | + python-version: ${{ matrix.python }} |
| 21 | + cache: pip |
| 22 | + cache-dependency-path: test-requirements.txt |
| 23 | + - name: Run tests |
| 24 | + run: ./ci.sh |
| 25 | + shell: bash |
| 26 | + env: |
| 27 | + # Should match 'name:' up above |
| 28 | + JOB_NAME: 'Windows (${{ matrix.python }})' |
| 29 | + |
| 30 | + Ubuntu: |
| 31 | + name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})' |
| 32 | + timeout-minutes: 10 |
| 33 | + runs-on: 'ubuntu-latest' |
| 34 | + strategy: |
| 35 | + fail-fast: false |
| 36 | + matrix: |
| 37 | + python: ['3.7', '3.8', '3.9', '3.10', '3.11-dev'] |
| 38 | + check_formatting: ['0'] |
| 39 | + extra_name: [''] |
| 40 | + include: |
| 41 | + - python: '3.10' |
| 42 | + check_formatting: '1' |
| 43 | + extra_name: ', check formatting' |
| 44 | + steps: |
| 45 | + - name: Checkout |
| 46 | + uses: actions/checkout@v2 |
| 47 | + - name: Setup python |
| 48 | + uses: actions/setup-python@v2 |
| 49 | + if: "!endsWith(matrix.python, '-dev')" |
| 50 | + with: |
| 51 | + python-version: ${{ matrix.python }} |
| 52 | + cache: pip |
| 53 | + cache-dependency-path: test-requirements.txt |
| 54 | + - name: Setup python (dev) |
| 55 | + uses: deadsnakes/[email protected] |
| 56 | + if: endsWith(matrix.python, '-dev') |
| 57 | + with: |
| 58 | + python-version: '${{ matrix.python }}' |
| 59 | + - name: Run tests |
| 60 | + run: ./ci.sh |
| 61 | + env: |
| 62 | + CHECK_FORMATTING: '${{ matrix.check_formatting }}' |
| 63 | + # Should match 'name:' up above |
| 64 | + JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})' |
| 65 | + |
| 66 | + macOS: |
| 67 | + name: 'macOS (${{ matrix.python }})' |
| 68 | + timeout-minutes: 10 |
| 69 | + runs-on: 'macos-latest' |
| 70 | + strategy: |
| 71 | + fail-fast: false |
| 72 | + matrix: |
| 73 | + python: ['3.7', '3.8', '3.9', '3.10'] |
| 74 | + steps: |
| 75 | + - name: Checkout |
| 76 | + uses: actions/checkout@v2 |
| 77 | + - name: Setup python |
| 78 | + uses: actions/setup-python@v2 |
| 79 | + with: |
| 80 | + python-version: ${{ matrix.python }} |
| 81 | + cache: pip |
| 82 | + cache-dependency-path: test-requirements.txt |
| 83 | + - name: Run tests |
| 84 | + run: ./ci.sh |
| 85 | + env: |
| 86 | + # Should match 'name:' up above |
| 87 | + JOB_NAME: 'macOS (${{ matrix.python }})' |
0 commit comments