Skip to content

Commit

Permalink
fix: fix minor errors in regression ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsbck committed Dec 23, 2024
1 parent ac5026d commit 41c033f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,11 @@ jobs:
script: |
const fs = require('fs');
let status = '${{ steps.comparison.outcome }}' === 'success' ? '✅' : '❌';
let message = '## Regression Baseline Update\n' + status + ' Process completed\n\n';
let message = '## Regression Test Results\n' + status + ' Process completed\n\n';
try {
const TestReport = fs.readFileSync('tests/regression_test_report.txt', 'utf8');
message += '```\n' + TestReport + '\n```\n\n';
// Add information about where the changes were pushed
if ('${{ steps.comparison.outcome }}' === 'success') {
if (!${{ fromJson(steps.check-fork.outputs.result) }}) {
message += '✨ Changes have been pushed directly to this PR\n';
} else {
const prNumber = '${{ steps.create-pr.outputs.pull-request-number }}';
message += `✨ Changes have been pushed to a new PR #${prNumber} because this PR is from a fork\n`;
}
}
} catch (error) {
message += '⚠️ No test report was generated\n';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def generate_regression_report(base_results, new_results):
if base_time is None:
status = "🆕"
elif new_time <= base_time:
status = "🟢" if diff is not None and diff < -0.05 else "🟠"
status = "🟢" if diff is not None and diff < 0.05 else "🟠"
elif new_time > base_time:
status = "🔴"
else:
Expand Down

0 comments on commit 41c033f

Please sign in to comment.