AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Fix CI cassette checkout
Reinier van der Leer4d514694738e
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 3e21d1d701..dde98cf916 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -108,22 +108,27 @@ jobs:if: ${{ startsWith(github.event_name, 'pull_request') }}run: |cassette_branch="${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}"+ cassette_base_branch="${{ github.event.pull_request.base.ref }}"cd tests/Auto-GPT-test-cassettes+ if ! git ls-remote --exit-code --heads origin $cassette_base_branch ; then+ cassette_base_branch="master"+ fi+if git ls-remote --exit-code --heads origin $cassette_branch ; thengit fetch origin $cassette_branch- git fetch origin ${{ github.event.pull_request.base.ref }}+ git fetch origin $cassette_base_branchgit checkout $cassette_branch# Pick non-conflicting cassette updates from the base branch- git merge --no-commit --strategy-option=ours origin/${{ github.event.pull_request.base.ref }}+ git merge --no-commit --strategy-option=ours origin/$cassette_base_branchecho "Using cassettes from mirror branch '$cassette_branch'," \- "synced to upstream branch '${{ github.event.pull_request.base.ref }}'."+ "synced to upstream branch '$cassette_base_branch'."elsegit checkout -b $cassette_branchecho "Branch '$cassette_branch' does not exist in cassette submodule." \- "Using cassettes from '${{ github.event.pull_request.base.ref }}'."+ "Using cassettes from '$cassette_base_branch'."fi- name: Set up Python ${{ matrix.python-version }}