From 8e6de5a10f5cdf3ad5f5b47db7b947140a5c4d19 Mon Sep 17 00:00:00 2001 From: jnsbck-uni Date: Fri, 22 Nov 2024 11:53:00 +0100 Subject: [PATCH] wip: retry w.o. baselines existing --- .../workflows/update_regression_baseline.yml | 10 ++++++++-- tests/regression_test_baselines.json | 17 ----------------- 2 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 tests/regression_test_baselines.json diff --git a/.github/workflows/update_regression_baseline.yml b/.github/workflows/update_regression_baseline.yml index 98ada263..55806f94 100644 --- a/.github/workflows/update_regression_baseline.yml +++ b/.github/workflows/update_regression_baseline.yml @@ -46,12 +46,18 @@ jobs: run: | git config --global user.name '$username' git config --global user.email '$username@users.noreply.github.com' - mv tests/regression_test_baselines.json tests/regression_test_baselines.json.bak + + # Check if regression test results exist in main branch + if [ -f 'git cat-file -e main:tests/regression_test_baselines.json' ]; then # modify to use main:tests/regression_test_baselines.json when merged to main + mv tests/regression_test_baselines.json tests/regression_test_baselines.json.bak + else + echo "No pre-existing baselines found" + fi NEW_BASELINE=1 pytest -m regression - name: Add Baseline update report to PR comment uses: actions/github-script@v7 - if: always() + if: github.event.pull_request.base.ref == 'main' # might need `always()` to work with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/tests/regression_test_baselines.json b/tests/regression_test_baselines.json deleted file mode 100644 index cdf9e30b..00000000 --- a/tests/regression_test_baselines.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "ec3a4fad11d2bfb1bc5f8f10529cb06f2ff9919b377e9c0a3419c7f7f237f06e": { - "test_name": "test_runtime", - "input_kwargs": { - "num_cells": 1, - "artificial": false, - "connect": false, - "connection_prob": 0.0, - "voltage_solver": "jaxley.stone" - }, - "runtimes": { - "build_time": 0.10014088948567708, - "compile_time": 0.3103648026784261, - "run_time": 0.2102543512980143 - } - } -} \ No newline at end of file