Skip to content

Commit

Permalink
Remove travis (#1680)
Browse files Browse the repository at this point in the history
* removing travis config file

* update actions to not look for travis results

* updating tests
  • Loading branch information
deirdre-k authored Feb 4, 2025
1 parent 78fc476 commit fec0bfa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_if_pr_is_automergeable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Check if PR is automergeable
# A PR is automergeable iff it:
# 1) is labeled "automerge" OR "automerge-web" (originates from web submission) (checked in actions_helpers.py)
# 2) only changes plugins (subdirs of /benchmarks, /data, /models, /metrics)
# 3) passes all tests (Travis and Jenkins).
# 3) passes all tests (Jenkins tests specified in actions_helpers.py).
# If all 3 conditions are met, the "automerge-approved" label is applied to the PR
# (This label triggers the `automerge_plugin-only_prs` workflow to merge the PR.)
#
Expand Down
66 changes: 0 additions & 66 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions brainscore_vision/submission/actions_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Uses GitHub API to support the following functions
- Retrieve a PR Head (SHA or branch name) from the workflow trigger event
- Retrieve a PR number from a PR Head (SHA or branch name)
- Check test suite status (Travis, Jenkins)
- Check test suite status (Jenkins)
Final outputs are accessed by the action via print()
"""

Expand Down Expand Up @@ -134,8 +134,7 @@ def send_failure_email(email: str, pr_number: str, mail_username: str, mail_pass
# Check test results and ensure PR is automergeable
statuses_json = get_data(f"{BASE_URL}/statuses/{pr_head}")

results_dict = {'travis_pr_result': get_statuses_result('continuous-integration/travis', statuses_json),
'jenkins_plugintests_result': get_statuses_result('Brain-Score Plugins Unit tests (AWS Jenkins, AWS Execution)', statuses_json),
results_dict = {'jenkins_plugintests_result': get_statuses_result('Brain-Score Plugins Unit tests (AWS Jenkins, AWS Execution)', statuses_json),
'jenkins_unittests_result': get_statuses_result('Brain-Score Non-Plugin Unit tests (AWS Jenkins, AWS Execution)', statuses_json)}

tests_pass = are_all_tests_passing(results_dict)
Expand Down
8 changes: 2 additions & 6 deletions tests/test_submission/test_actions_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ def test_get_statuses_result():
assert jenkins_plugintests_result == 'failure'

def test_are_all_tests_passing():
results_dict = {'travis_branch_result': 'success',
'travis_pr_result': 'success',
'jenkins_plugintests_result': 'success',
results_dict = {'jenkins_plugintests_result': 'success',
'jenkins_unittests_result': 'success'}
success = are_all_tests_passing(results_dict)
assert success == True

def test_one_test_failing():
results_dict = {'travis_branch_result': 'success',
'travis_pr_result': 'failure',
'jenkins_plugintests_result': 'success',
results_dict = {'jenkins_plugintests_result': 'failure',
'jenkins_unittests_result': 'success'}
success = are_all_tests_passing(results_dict)
assert success == False
Expand Down

0 comments on commit fec0bfa

Please sign in to comment.