Skip to content

Commit

Permalink
wip: run regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsbck committed Nov 22, 2024
1 parent 9ae3f9e commit 8cfc276
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: Regression Tests

on:
# pull_request:
# branches:
# - main
pull_request:
branches:
- main

jobs:
regression_tests:
Expand All @@ -27,17 +27,17 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[dev]"
# - name: Run benchmarks and compare to baseline
# if: github.event.pull_request.base.ref == 'main'
# run: |
# # Check if regression test results exist in main branch
# if [ -f 'git cat-file -e main:tests/regression_test_baselines.json' ]; then
# git checkout main tests/regression_test_baselines.json
# else
# echo "No regression test results found in main branch"
# fi
# pytest -m regression
# git checkout
- name: Run benchmarks and compare to baseline
if: github.event.pull_request.base.ref == 'main'
run: |
# Check if regression test results exist in main branch
if [ -f 'git cat-file -e main:tests/regression_test_baselines.json' ]; then
git checkout main tests/regression_test_baselines.json
else
echo "No regression test results found in main branch"
fi
pytest -m regression
git checkout
- name: Run benchmarks and compare to baseline
if: github.event.pull_request.base.ref == 'main'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/update_regression_baseline.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# .github/workflows/update_regression_tests.yml

# for details on triggering a workflow from a comment, see:
# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2
name: Update Regression Baseline

on:
issue_comment: # trigger from comment; event runs on the default branch
types: [created]
pull_request:
branches:
- main
# pull_request:
# branches:
# - main

jobs:
update_regression_tests:
name: update_regression_tests
runs-on: ubuntu-20.04
# Trigger from a comment
# if: github.event.issue.pull_request && contains(github.event.comment.body, '/update_baseline')
permissions:
contents: write
Expand Down

0 comments on commit 8cfc276

Please sign in to comment.