generated from datalad/datalad-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (59 loc) · 1.85 KB
/
codspeed.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
name: codspeed-benchmarks
on:
# Run on pushes to the main branch
push:
branches:
- "main"
# Run on pull requests
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
# codspeed needs 3.12 for trace generation
python-version: 3.12
- name: Set up environment
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Almighty"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install git-annex
id: gitannex
run: |
python -m pip install datalad-installer
datalad-installer -E ${HOME}/dlinstaller_env.sh --sudo ok git-annex -m snapshot
. "${HOME}/dlinstaller_env.sh"
# make the PATH modification available to the following steps of the
# workflow
echo "PATH=$PATH" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: |
python -m pip install -r requirements-devel.txt
python -m pip install pytest-codspeed
- name: Debug
env:
PATH: ${{ steps.gitannex.outputs.PATH }}
run: |
cat "$GITHUB_ENV"
echo "------------"
echo "$PATH"
echo "------------"
. "${HOME}/dlinstaller_env.sh"
echo "------------"
echo "$PATH"
echo "------------"
git annex version
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: |
python -m pytest --codspeed datalad_next