|
24 | 24 | fail-fast: false |
25 | 25 | matrix: |
26 | 26 | platform: [ubuntu-latest, macos-latest] # [ubuntu-latest, windows-latest, macos-latest] |
27 | | - python-version: ["3.10", "3.12"] |
| 27 | + python-version: ["3.11", "3.13"] |
28 | 28 |
|
29 | 29 | steps: |
30 | 30 | - uses: actions/checkout@v6 |
|
70 | 70 | with: |
71 | 71 | name: plotting-results-${{ matrix.python-version }}-${{ matrix.platform }} |
72 | 72 | path: /Users/runner/work/napari-spatialdata/napari-spatialdata/tests/plots/generated/* |
73 | | - |
74 | | - test_benchmarks: |
75 | | - name: test benchmarks |
76 | | - runs-on: ubuntu-latest |
77 | | - timeout-minutes: 60 |
78 | | - env: |
79 | | - GIT_LFS_SKIP_SMUDGE: 1 |
80 | | - steps: |
81 | | - - uses: actions/checkout@v6 |
82 | | - with: |
83 | | - fetch-depth: 0 |
84 | | - ref: ${{ github.ref }} |
85 | | - |
86 | | - - uses: actions/setup-python@v6 |
87 | | - with: |
88 | | - python-version: 3.11 |
89 | | - cache-dependency-path: pyproject.toml |
90 | | - |
91 | | - - name: Install dependencies with 'pre' extras (since the above doesn't check pre-releases) |
92 | | - run: | |
93 | | - python -m pip install --upgrade pip |
94 | | - pip install .[pre] |
95 | | -
|
96 | | - - uses: tlambert03/setup-qt-libs@v1 |
97 | | - |
98 | | - - uses: octokit/request-action@v2.x |
99 | | - # here we get hash of the latest release commit to compare with PR |
100 | | - id: latest_release |
101 | | - with: |
102 | | - route: GET /repos/{owner}/{repo}/releases/latest |
103 | | - owner: scverse |
104 | | - repo: napari-spatialdata |
105 | | - env: |
106 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
107 | | - |
108 | | - - name: install dependencies |
109 | | - run: | |
110 | | - pip install --upgrade pip |
111 | | - pip install "asv[virtualenv]" |
112 | | - env: |
113 | | - PIP_CONSTRAINT: benchmarks/benchmark.txt |
114 | | - |
115 | | - - name: asv machine |
116 | | - run: asv machine --yes |
117 | | - |
118 | | - - name: Run benchmarks PR |
119 | | - uses: aganders3/headless-gui@v2 |
120 | | - with: |
121 | | - run: | |
122 | | - asv run --show-stderr --quick --attribute timeout=300 HEAD^! |
123 | | - env: |
124 | | - PR: 1 # prevents asv from running very compute-intensive benchmarks |
125 | | - PIP_CONSTRAINT: ${{ github.workspace }}/benchmarks/benchmark.txt |
126 | | - |
127 | | - - name: Fetch latest main |
128 | | - run: git fetch origin main |
129 | | - |
130 | | - - name: Fetch latest release commit |
131 | | - run: git fetch origin ${{ fromJSON(steps.latest_release.outputs.data).target_commitish }} |
132 | | - |
133 | | - - name: Ensure local main exists |
134 | | - run: | |
135 | | - CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) |
136 | | - if [ "$CURRENT_BRANCH" != "main" ]; then |
137 | | - git branch main origin/main |
138 | | - fi |
139 | | -
|
140 | | - - name: Run benchmarks latest release |
141 | | - uses: aganders3/headless-gui@v2 |
142 | | - with: |
143 | | - run: | |
144 | | - asv run --show-stderr --quick --attribute timeout=300 ${{ fromJSON(steps.latest_release.outputs.data).target_commitish }}^! |
145 | | - env: |
146 | | - PR: 1 # prevents asv from running very compute-intensive benchmarks |
147 | | - PIP_CONSTRAINT: ${{ github.workspace }}/benchmarks/benchmark.txt |
0 commit comments