Skip to content

Merge pull request #6 from lapp0/issue-883 #4

Merge pull request #6 from lapp0/issue-883

Merge pull request #6 from lapp0/issue-883 #4

name: Update Historical ASV Benchmarks
on:
push:
branches: [main]
jobs:
update-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Run ASV benchmarks
run: asv run
- name: Checkout the benchmarks repository
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TARGET_REPO: ${{ vars.TARGET_REPO }}
TARGET_BRANCH: ${{ vars.TARGET_BRANCH }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git clone https://x-access-token:${GH_TOKEN}@github.com/${TARGET_REPO}.git -b ${TARGET_BRANCH} benchmarks-repo
- name: Copy ASV results to benchmarks repository
run: |
rm -rf benchmarks-repo/asv_results
mv asv_results benchmarks-repo/
- name: Commit and push ASV results
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
cd benchmarks-repo
git add asv_results
git commit -m "Update ASV benchmarks"
git push origin ${TARGET_BRANCH}