Skip to content

Commit

Permalink
Only check pytket coverage for PRs to develop. (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed Jan 8, 2024
1 parent e1ddb5f commit cf1f24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ jobs:
check_pytket_coverage:
name: Check pytket line and branch coverage
needs: build_test_pytket_ubuntu
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compare-pytket-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def compare(old_cov_file, new_cov_file):
print(f"Branch coverage: {new_branch_rate}")
print()

if new_line_rate < old_line_rate:
if new_line_rate + 0.01 < old_line_rate:
sys.exit("Line coverage has decreased!")
if new_branch_rate < old_branch_rate:
if new_branch_rate + 0.01 < old_branch_rate:
sys.exit("Branch coverage has decreased!")


Expand Down

0 comments on commit cf1f24a

Please sign in to comment.