|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [ubuntu-latest, macOS-latest, windows-latest] |
| 12 | + python-version: [3.6, 3.7, 3.8] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + - name: Set up Python ${{ matrix.python-version }} |
| 17 | + uses: actions/setup-python@v2 |
| 18 | + with: |
| 19 | + python-version: ${{ matrix.python-version }} |
| 20 | + - name: Prepare Ubuntu |
| 21 | + run: | |
| 22 | + sudo apt-get update |
| 23 | + sudo apt-get install --no-install-recommends -y pandoc ffmpeg |
| 24 | + if: matrix.os == 'ubuntu-latest' |
| 25 | + - name: Prepare OSX |
| 26 | + run: brew install pandoc ffmpeg |
| 27 | + if: matrix.os == 'macOS-latest' |
| 28 | + - name: prepare Windows |
| 29 | + run: choco install pandoc ffmpeg |
| 30 | + if: matrix.os == 'windows-latest' |
| 31 | + - name: Install dependencies |
| 32 | + run: | |
| 33 | + python -V |
| 34 | + python -m pip install --upgrade pip |
| 35 | + python -m pip install . |
| 36 | + python -m pip install -r tests/requirements.txt |
| 37 | + python -m pip install -r doc/requirements.txt |
| 38 | + # This is needed in example scripts: |
| 39 | + python -m pip install pillow |
| 40 | + - name: Test |
| 41 | + run: python -m pytest |
| 42 | + - name: Test examples |
| 43 | + run: python doc/examples/run_all.py |
| 44 | + - name: Test documentation |
| 45 | + run: python -m sphinx doc/ _build/ -b doctest |
0 commit comments