|
9 | 9 | test:
|
10 | 10 | strategy:
|
11 | 11 | matrix:
|
12 |
| - os: [ubuntu-latest] |
13 |
| - python: ['3.9', '3.10', '3.11', '3.12'] |
14 |
| - numpy_version: ["numpy-latest", "numpy<2"] |
| 12 | + os: [ ubuntu-latest ] |
| 13 | + python: [ "3.9", "3.10", "3.11", "3.12" ] |
| 14 | + numpy_version: [ "numpy-latest", "numpy<2" ] |
15 | 15 | runs-on: ${{ matrix.os }}
|
16 | 16 |
|
17 | 17 | steps:
|
18 |
| - - uses: actions/checkout@v2 |
19 |
| - - name: Set up Python ${{ matrix.python }} |
20 |
| - uses: actions/setup-python@v1 |
21 |
| - with: |
22 |
| - python-version: ${{ matrix.python }} |
23 |
| - - uses: actions/cache@v3 |
24 |
| - with: |
25 |
| - path: ~/.cache/pip |
26 |
| - key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} |
27 |
| - restore-keys: | |
28 |
| - ${{ runner.os }}-pip- |
29 |
| - - name: Install dependencies |
30 |
| - run: | |
31 |
| - python -m pip install --upgrade pip |
32 |
| - if [ "${{ matrix.numpy_version }}" = "numpy<2" ]; then |
33 |
| - pip install ".[test,test_numpy_pre2]" |
34 |
| - else |
35 |
| - pip install ".[test]" |
36 |
| - fi |
37 |
| - - name: Test with pytest |
38 |
| - run: | |
39 |
| - pytest tests |
| 18 | + - name: Checkout code |
| 19 | + uses: actions/checkout@v2 |
| 20 | + |
| 21 | + - name: Set up Python ${{ matrix.python }} |
| 22 | + uses: actions/setup-python@v1 |
| 23 | + with: |
| 24 | + python-version: ${{ matrix.python }} |
| 25 | + |
| 26 | + - name: Use cache for pip dependencies |
| 27 | + uses: actions/cache@v3 |
| 28 | + with: |
| 29 | + path: ~/.cache/pip |
| 30 | + key: ${{ runner.os }}-pip-${{ hashFiles("**/pyproject.toml") }} |
| 31 | + restore-keys: | |
| 32 | + ${{ runner.os }}-pip- |
| 33 | +
|
| 34 | + - name: Install dependencies |
| 35 | + run: | |
| 36 | + python -m pip install --upgrade pip |
| 37 | + if [ "${{ matrix.numpy_version }}" = "numpy<2" ]; then |
| 38 | + pip install ".[test,test_numpy_pre2]" |
| 39 | + else |
| 40 | + pip install ".[test]" |
| 41 | + fi |
| 42 | +
|
| 43 | + - name: Test with pytest |
| 44 | + run: | |
| 45 | + pytest tests |
0 commit comments