diff --git a/.github/workflows/automerge_plugin-only_prs.yml b/.github/workflows/automerge_plugin-only_prs.yml index c66248121..54e84ff53 100644 --- a/.github/workflows/automerge_plugin-only_prs.yml +++ b/.github/workflows/automerge_plugin-only_prs.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Get Travis build status + - name: Get test results and ensure automergeable id: gettestresults run: | echo "test_results=$( python brainscore_vision/submission/check_test_status.py ${{ github.event.pull_request.head.sha }} )" diff --git a/.github/workflows/score_new_plugins.yml b/.github/workflows/score_new_plugins.yml index d69402675..53248ae07 100644 --- a/.github/workflows/score_new_plugins.yml +++ b/.github/workflows/score_new_plugins.yml @@ -22,6 +22,7 @@ jobs: changes_models_or_benchmarks: name: Check if PR makes changes to /models or /benchmarks + if: github.event.pull_request.merged == true runs-on: ubuntu-latest outputs: PLUGIN_INFO: ${{ steps.getpluginfo.outputs.PLUGIN_INFO }} @@ -37,14 +38,14 @@ jobs: with: python-version: 3.7 - - name: Save changed files to env var - run: echo "CHANGED_FILES=$(git diff --name-only origin/main~1 origin/$GITHUB_HEAD_REF | tr '\n' ' ')" >> $GITHUB_ENV - - name: Installing package dependencies run: | python -m pip install --upgrade pip setuptools python -m pip install ".[test]" - + + - name: Save changed files to env var + run: echo "CHANGED_FILES=$(git diff --name-only origin/main~1 origin/$GITHUB_HEAD_REF | tr '\n' ' ')" >> $GITHUB_ENV + - name: Get plugin info id: getpluginfo run: | @@ -58,7 +59,7 @@ jobs: get_submitter_info: name: Get PR author email and (if web submission) Brain-Score user ID runs-on: ubuntu-latest - needs: [setup, changes_models_or_benchmarks] + needs: [changes_models_or_benchmarks] if: ${{ needs.changes_models_or_benchmarks.outputs.RUN_SCORE == 'True' }} env: PLUGIN_INFO: ${{ needs.changes_models_or_benchmarks.outputs.PLUGIN_INFO }} @@ -113,8 +114,11 @@ jobs: with: python-version: 3.7 - - name: Build project and run scoring + - name: Build project run: | python -m pip install --upgrade pip setuptools python -m pip install ".[test]" + + - name: Run scoring + run: | python -c 'from brainscore_core.submission.endpoints import call_jenkins; call_jenkins('\''${{ env.PLUGIN_INFO }}'\'')'