| 1 | name: Tests |
| 2 | |
| 3 | on: pull_request |
| 4 | |
| 5 | jobs: |
| 6 | tests: |
| 7 | strategy: |
| 8 | matrix: |
| 9 | os: [ubuntu-latest, windows-latest, macos-latest] |
| 10 | python-version: ['3.9', '3.10', '3.11'] |
| 11 | |
| 12 | runs-on: ${{ matrix.os }} |
| 13 | |
| 14 | steps: |
| 15 | - uses: actions/checkout@v4 |
| 16 | - name: Set up Python ${{ matrix.python-version }} |
| 17 | uses: actions/setup-python@v4 |
| 18 | with: |
| 19 | python-version: ${{ matrix.python-version }} |
| 20 | - name: Install dependencies |
| 21 | run: | |
| 22 | python -m pip install --upgrade pip setuptools wheel |
| 23 | pip install .[tests] -v |
| 24 | pip list |
| 25 | - name: Run tests |
| 26 | run: pytest -v --pyargs cyarray --benchmark-save benchmark-stats --benchmark-json benchmark-full.json --benchmark-histogram |
| 27 | |
| 28 | - name: 'Upload Perf Data' |
| 29 | uses: actions/upload-artifact@v4 |
| 30 | with: |
| 31 | name: perf-bench-result-${{ matrix.python-version }}-${{ matrix.os }} |
| 32 | path: | |
| 33 | benchmark_*.svg |
| 34 | .benchmarks/* |
| 35 | benchmark-full.json |