|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/tests.yml" |
| 7 | + - "setup.cfg" |
| 8 | + - "mss/**" |
| 9 | + |
| 10 | +jobs: |
| 11 | + lint: |
| 12 | + name: Code quality checks |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v3 |
| 16 | + with: |
| 17 | + ref: ${{ github.event.inputs.branch }} |
| 18 | + - uses: actions/setup-python@v4 |
| 19 | + with: |
| 20 | + python-version: "3.11" |
| 21 | + - name: Install test dependencies |
| 22 | + run: python -m pip install -U pip wheel tox |
| 23 | + - name: Tests |
| 24 | + run: python -m tox -e lint |
| 25 | + |
| 26 | + types: |
| 27 | + name: Types checks |
| 28 | + runs-on: ubuntu-latest |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v3 |
| 31 | + with: |
| 32 | + ref: ${{ github.event.inputs.branch }} |
| 33 | + - uses: actions/setup-python@v4 |
| 34 | + with: |
| 35 | + python-version: "3.11" |
| 36 | + - name: Install test dependencies |
| 37 | + run: python -m pip install -U pip wheel tox |
| 38 | + - name: Tests |
| 39 | + run: python -m tox -e types |
| 40 | + |
| 41 | + documentation: |
| 42 | + name: Documentation build |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v3 |
| 46 | + with: |
| 47 | + ref: ${{ github.event.inputs.branch }} |
| 48 | + - uses: actions/setup-python@v4 |
| 49 | + with: |
| 50 | + python-version: "3.11" |
| 51 | + - name: Install test dependencies |
| 52 | + run: python -m pip install -U pip wheel tox |
| 53 | + - name: Tests |
| 54 | + run: python -m tox -e docs |
| 55 | + |
| 56 | + tests: |
| 57 | + name: "${{ matrix.os }} for ${{ matrix.python }}" |
| 58 | + runs-on: ${{ matrix.os }} |
| 59 | + strategy: |
| 60 | + fail-fast: false |
| 61 | + matrix: |
| 62 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 63 | + python: ["3.6", " 3.7", " 3.8", "3.9", "3.10", "3.11"] |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v3 |
| 66 | + with: |
| 67 | + ref: ${{ github.event.inputs.branch }} |
| 68 | + - uses: actions/setup-python@v4 |
| 69 | + with: |
| 70 | + python-version: ${{ matrix.python }} |
| 71 | + - name: Install test dependencies |
| 72 | + run: python -m pip install -U pip wheel tox |
| 73 | + - name: Tests |
| 74 | + if: matrix.os == 'ubuntu-latest' |
| 75 | + run: | |
| 76 | + export DISPLAY=:99 |
| 77 | + sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & |
| 78 | + python -m tox -e py |
| 79 | + - name: Tests |
| 80 | + if: matrix.os != 'ubuntu-latest' |
| 81 | + run: python -m tox -e py |
0 commit comments