-
Notifications
You must be signed in to change notification settings - Fork 63
44 lines (40 loc) · 1.28 KB
/
benchmark.yml
File metadata and controls
44 lines (40 loc) · 1.28 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
name: Benchmarks
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1' # Every Monday at 6am UTC
push:
branches:
- main
- stable
- '*.x'
tags:
- '*'
pull_request:
types:
- synchronize
- labeled
# Only cancel in-progress jobs or runs for the current workflow
# This cancels the already triggered workflows for a specific PR without canceling
# other instances of this workflow (other PRs, scheduled triggers, etc) when something
# within that PR re-triggers this CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codspeed:
if: (github.repository == 'asdf-format/asdf' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Benchmarks')))
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install pytest-codspeed .[benchmark]
- uses: CodSpeedHQ/action@v3
with:
run: pytest benchmarks/ --codspeed
token: ${{ secrets.CODSPEED_TOKEN }}