a b/.github/workflows/test.yml
1
name: Test
2
3
on:
4
    push:
5
        branches: [main]
6
    pull_request:
7
        branches: [main]
8
9
concurrency:
10
    group: ${{ github.workflow }}-${{ github.ref }}
11
    cancel-in-progress: true
12
13
jobs:
14
    test:
15
        runs-on: ${{ matrix.os }}
16
        defaults:
17
            run:
18
                shell: bash -e {0} # -e to fail on error
19
20
        strategy:
21
            fail-fast: false
22
            matrix:
23
                include:
24
                    - os: ubuntu-latest
25
                      python: "3.10"
26
                    - os: ubuntu-latest
27
                      python: "3.13"
28
                    - os: ubuntu-latest
29
                      python: "3.13"
30
                      pip-flags: "--pre"
31
32
        env:
33
            OS: ${{ matrix.os }}
34
            PYTHON: ${{ matrix.python }}
35
36
        steps:
37
            - uses: actions/checkout@v4
38
            - name: Set up Python ${{ matrix.python }}
39
              uses: actions/setup-python@v5
40
              with:
41
                  python-version: ${{ matrix.python }}
42
43
            - name: Install test dependencies
44
              run: python -m pip install --upgrade uv wheel
45
            - name: Install dependencies
46
              run: uv pip install --system ${{ matrix.pip-flags }} .[dev,test]
47
48
            - name: Test
49
              env:
50
                  MPLBACKEND: agg
51
                  PLATFORM: ${{ matrix.os }}
52
                  DISPLAY: :42
53
              run: pytest -v --cov --color=yes
54
55
            - name: Upload coverage
56
              uses: codecov/codecov-action@v3