Skip to content

Commit

Permalink
Chore (CI): Fail if VCR is not full rebased
Browse files Browse the repository at this point in the history
Signed-off-by: OjusWiZard <[email protected]>
  • Loading branch information
OjusWiZard committed May 23, 2024
1 parent cf457d8 commit 52fd0c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/task_backend_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
env:
CI: true
TEST_ENVIRONMENT: ${{ inputs.test_environment }}
TARGET_BRANCH: ${{ github.base_ref }}
SOURCE_BRANCH: ${{ github.head_ref }}
runs-on: ${{ inputs.os }}
name: 'Backend tests'
timeout-minutes: 50
Expand All @@ -32,6 +34,16 @@ jobs:
with:
repository: rotki/test-caching
path: test-caching
run: |
CASSETTES_DIR=$HOME/work/rotki/rotki/test-caching
echo $(cd "${CASSETTES_DIR}" && git branch)
LATEST_TARGET_COMMIT=$(cd "${CASSETTES_DIR}" && git rev-parse "${TARGET_BRANCH}")
branches=$(cd "${CASSETTES_DIR}" && git branch --contains "${LATEST_TARGET_COMMIT}")
(for branch in $branches; do
[[ $branch =~ $SOURCE_BRANCH ]] && exit;
done) &&
echo "VCR setup: $SOURCE_BRANCH fully rebased on $TARGET_BRANCH" ||
echo "VCR setup: $SOURCE_BRANCH not fully rebased on $TARGET_BRANCH" && exit 1
- name: Load env
uses: rotki/action-env@v2
with:
Expand Down
1 change: 1 addition & 0 deletions rotkehlchen/tests/unit/globaldb/test_asset_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ def test_asset_update(
assets_updater.perform_update(up_to_version=999, conflicts={})

with GlobalDBHandler().conn.read_ctx() as cursor:
# test comment
assert cursor.execute('SELECT * FROM assets WHERE identifier = "MYBONK"').fetchall() == ([
('MYBONK', 'Bonk', 'Y'),
] if update_assets else [])
Expand Down

0 comments on commit 52fd0c5

Please sign in to comment.