generated from datalad/datalad-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dedicated codspeed GitHub action
And disable running benchmarks on appveyor. Appveyor is not supported by codspeed, and there is no values in running benchmarks without doing anything with the results.
- Loading branch information
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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 | ||
run: | | ||
python -m pip install datalad-installer | ||
datalad-installer -E ${HOME}/dlinstaller_env.sh --sudo ok git-annex -m snapshot | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r requirements-devel.txt | ||
python -m pip install pytest-codspeed | ||
- name: Run benchmarks | ||
uses: CodSpeedHQ/action@v2 | ||
with: | ||
token: ${{ secrets.CODSPEED_TOKEN }} | ||
run: | | ||
. ${HOME}/dlinstaller_env.sh | ||
python -m pytest --codspeed datalad_next |