| 1 | name: ci |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | pull_request: |
| 8 | |
| 9 | jobs: |
| 10 | lint: |
| 11 | runs-on: ubuntu-latest |
| 12 | strategy: |
| 13 | matrix: |
| 14 | python-version: [3.9] |
| 15 | steps: |
| 16 | - uses: actions/checkout@v2 |
| 17 | with: |
| 18 | fetch-depth: 0 |
| 19 | submodules: true |
| 20 | - name: Set up Python ${{ matrix.python-version }} |
| 21 | uses: actions/setup-python@v2 |
| 22 | with: |
| 23 | python-version: ${{ matrix.python-version }} |
| 24 | - name: Install dependencies |
| 25 | run: | |
| 26 | pip install -e .[test] |
| 27 | - name: Lint |
| 28 | run: | |
| 29 | make lint |
| 30 | - name: Mypy |
| 31 | run: | |
| 32 | make mypy |
| 33 | build: |
| 34 | runs-on: ubuntu-latest |
| 35 | strategy: |
| 36 | matrix: |
| 37 | python-version: [3.9, 3.13] |
| 38 | env: |
| 39 | MPLBACKEND: agg |
| 40 | steps: |
| 41 | - uses: actions/checkout@v2 |
| 42 | with: |
| 43 | fetch-depth: 0 |
| 44 | submodules: true |
| 45 | - name: Set up Python ${{ matrix.python-version }} |
| 46 | uses: actions/setup-python@v2 |
| 47 | with: |
| 48 | python-version: ${{ matrix.python-version }} |
| 49 | - name: Install |
| 50 | run: | |
| 51 | pip install setuptools |
| 52 | pip install .[all] |
| 53 | pip install .[test] |
| 54 | - name: Test |
| 55 | run: | |
| 56 | make test |
| 57 | - name: Run examples |
| 58 | run: | |
| 59 | python getting_started.py |
| 60 | for f in examples/*.py; do |
| 61 | if [ -x $f ]; then |
| 62 | $f |
| 63 | fi |
| 64 | done |
| 65 | - name: Install from dist |
| 66 | run: | |
| 67 | make build |
| 68 | pip install dist/*.tar.gz |
| 69 | pip install dist/*.whl |