Skip to content

Commit

Permalink
Fix Auto-GPT CI cassette submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Sep 8, 2023
1 parent b00be97 commit 94bdcba
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/autogpt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ on:
branches: [ master, ci-test* ]
paths:
- 'autogpts/autogpt/**'
- '!autogpts/autogpt/tests/Auto-GPT-test-cassettes'
- '!autogpts/autogpt/tests/vcr_cassettes'
- '!autogpts/autogpt/tests/challenges/current_score.json'
pull_request:
branches: [ stable, master, release-* ]
paths:
- 'autogpts/autogpt/**'
- '!autogpts/autogpt/tests/Auto-GPT-test-cassettes'
- '!autogpts/autogpt/tests/vcr_cassettes'
- '!autogpts/autogpt/tests/challenges/current_score.json'
pull_request_target:
branches: [ master, release-*, ci-test* ]
paths:
- 'autogpts/autogpt/**'
- '!autogpts/autogpt/tests/Auto-GPT-test-cassettes'
- '!autogpts/autogpt/tests/vcr_cassettes'
- '!autogpts/autogpt/tests/challenges/current_score.json'

concurrency:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
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
cd tests/vcr_cassettes
if ! git ls-remote --exit-code --heads origin $cassette_base_branch ; then
cassette_base_branch="master"
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
git config "$config_key" \
"Authorization: Basic $base64_pat"
cd tests/Auto-GPT-test-cassettes
cd tests/vcr_cassettes
git config "$config_key" \
"Authorization: Basic $base64_pat"
Expand Down Expand Up @@ -223,15 +223,15 @@ jobs:
cassette_branch="${{ github.ref_name }}"
fi
cd tests/Auto-GPT-test-cassettes
cd tests/vcr_cassettes
# Commit & push changes to cassettes if any
if ! git diff --quiet; then
git add .
git commit -m "Auto-update cassettes"
git push origin HEAD:$cassette_branch
if [ ! $is_pull_request ]; then
cd ../..
git add tests/Auto-GPT-test-cassettes
git add tests/vcr_cassettes
git commit -m "Update cassette submodule"
git push origin HEAD:$cassette_branch
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/autogpt-docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
branches: [ master ]
paths:
- 'autogpts/autogpt/**'
- '!autogpts/autogpt/tests/Auto-GPT-test-cassettes'
- '!autogpts/autogpt/tests/vcr_cassettes'
- '!autogpts/autogpt/tests/challenges/current_score.json'
pull_request:
branches: [ master, release-*, stable ]
paths:
- 'autogpts/autogpt/**'
- '!autogpts/autogpt/tests/Auto-GPT-test-cassettes'
- '!autogpts/autogpt/tests/vcr_cassettes'
- '!autogpts/autogpt/tests/challenges/current_score.json'

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Run pytest with coverage
run: |
rm -rf tests/Auto-GPT-test-cassettes
rm -rf tests/vcr_cassettes
pytest -n auto --record-mode=all ${{ matrix.config.task }}
env:
CI: true
Expand All @@ -70,4 +70,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: cassettes-${{ matrix.config.task-name }}
path: tests/Auto-GPT-test-cassettes/
path: tests/vcr_cassettes/
2 changes: 1 addition & 1 deletion .github/workflows/pr-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: [ master, release-* ]
paths-ignore:
- 'autogpts/autogpt/tests/Auto-GPT-test-cassettes'
- 'autogpts/autogpt/tests/vcr_cassettes'
- 'autogpts/autogpt/tests/challenges/current_score.json'
- 'benchmark/reports/**'
# So that the `dirtyLabel` is removed if conflicts are resolve
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "autogpts/autogpt/tests/vcr_cassettes"]
path = autogpts/autogpt/tests/vcr_cassettes
url = https://github.com/Significant-Gravitas/Auto-GPT-test-cassettes
2 changes: 1 addition & 1 deletion autogpts/autogpt/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Exclude VCR cassettes from stats
tests/Auto-GPT-test-cassettes/**/**.y*ml linguist-generated
tests/vcr_cassettes/**/**.y*ml linguist-generated

# Mark documentation as such
docs/**.md linguist-documentation
4 changes: 0 additions & 4 deletions autogpts/autogpt/.gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion autogpts/autogpt/tests/vcr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_base_vcr_config(request):
@pytest.fixture()
def vcr_cassette_dir(request):
test_name = os.path.splitext(request.node.name)[0]
return os.path.join("tests/Auto-GPT-test-cassettes", test_name)
return os.path.join("tests/vcr_cassettes", test_name)


def patch_api_base(requestor: openai.api_requestor.APIRequestor):
Expand Down
1 change: 1 addition & 0 deletions autogpts/autogpt/tests/vcr_cassettes
Submodule vcr_cassettes added at f839a0

0 comments on commit 94bdcba

Please sign in to comment.