-
-
Notifications
You must be signed in to change notification settings - Fork 21
68 lines (60 loc) · 1.87 KB
/
ci-code-profiling.yml
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
name: codspeed-benchmarks
on:
push:
branches:
- "main" # or "master"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
# Use concurrency to ensure that only one instance of this workflow is running at a time
concurrency:
group: ci-profiling-codspeed-${{ github.ref_name }}
cancel-in-progress: true
jobs:
benchmarks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Set up swap space
uses: pierotofy/[email protected]
with:
swap-size-gb: 10
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-environment: false
environment-name: testing
condarc: |
channels:
- conda-forge
create-args: >-
ada-py
bcf-client
python=3.12
pytest
pytest-benchmark
pytest-codspeed
python-flatbuffers
- name: Install latest version
run: |
pip install -e .
# - name: Run pytest-benchmark
# run: pytest ./tests --ignore=./tests/fem/ --ignore=./tests/full/ --benchmark-json output.json
#
# - name: Store benchmark result
# uses: benchmark-action/github-action-benchmark@v1
# with:
# tool: 'pytest'
# output-file-path: output.json
# # Enable Job Summary for PRs
# summary-always: true
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: bash -el -c "pytest ./tests --ignore=./tests/fem/ --ignore=./tests/full/ --codspeed"