forked from airspeed-velocity/asv
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.55 KB
/
Copy pathtriggered.yml
File metadata and controls
76 lines (64 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Triggered
on:
workflow_dispatch:
inputs:
pr_number:
description: 'asv_runner PR number (refs/pull/<n>/head)'
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PDM_BUILD_SCM_VERSION: "0.0.0"
jobs:
ASVRunner:
name: asv × ${{ matrix.runner_source }} (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Keep in sync with primary CI Python set where practical; 3.9 needed for multi-env tests
python-version: ["3.9", "3.12", "3.14", "pypy-3.11"]
# pr = asv_runner PR head in benchmark envs; pypi = declared pin only (upstream guard)
runner_source: [pr, pypi]
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
# We need Python 3.9 always installed so multi-environment tests can run.
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: "3.9"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Setup a browser for more tests
uses: browser-actions/setup-chrome@latest
- name: Install asv[test,hg,envs]
run: python -m pip install -U pip && python -m pip install ".[test,hg,envs]"
- name: Get asv_runner PR head to be tested
if: matrix.runner_source == 'pr'
uses: actions/checkout@v6
with:
repository: airspeed-velocity/asv_runner
ref: refs/pull/${{ inputs.pr_number }}/head
path: latest_asv_runner
fetch-depth: 0
- name: Install PR asv_runner (host editable)
if: matrix.runner_source == 'pr'
run: python -m pip install -e ./latest_asv_runner
# Relative path: asv ParsedPipDeclaration truncates multi-segment absolutes (asv-8650).
# Use ASV_RUNNER_PATH (not ASV_RUNNER) — asv environment.py only reads the former.
- name: Run tests with PR asv_runner in envs
if: matrix.runner_source == 'pr'
env:
ASV_RUNNER_PATH: ./latest_asv_runner
run: python -m pytest -v --timeout=300 --webdriver=ChromeHeadless --durations=100 test
- name: Run tests with PyPI asv_runner only (upstream guard)
if: matrix.runner_source == 'pypi'
run: python -m pytest -v --timeout=300 --webdriver=ChromeHeadless --durations=100 test