Skip to content

codspeed-walltime-benchmarks #735

codspeed-walltime-benchmarks

codspeed-walltime-benchmarks #735

name: codspeed-walltime-benchmarks
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # runs daily at 00:00
pull_request:
types:
- synchronize
- labeled
paths:
- "dkist/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
schedule_checker:
runs-on: ubuntu-latest
outputs:
new_commit_count: ${{ steps.commit.outputs.new_commit_count }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Get new commits
id: commit
run: echo "new_commit_count=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
walltime-benchmarks:
needs: schedule_checker
if: |
(github.event_name == 'schedule' && needs.schedule_checker.outputs.new_commit_count != '0') ||
(github.event_name == 'pull_request' &&
(
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run Walltime Benchmarks')
)
) ||
github.event_name == 'workflow_dispatch'
runs-on: codspeed-macro
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
- name: Install requirements
run: python -m pip install .[tests] pytest-codspeed
- name: Run benchmarks
uses: CodspeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0
with:
mode: "walltime"
token: ${{ secrets.CODSPEED_TOKEN }} # zizmor: ignore[secrets-outside-env] We want this to run everywhere so it always needs the token
run: "pytest -vvv -r fEs --pyargs dkist --codspeed --remote-data=any -m walltime"