From 1a641d1572f2fd9c0eb4b7c535b79cfa7e7a09d0 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 31 Oct 2023 14:32:05 +0500 Subject: [PATCH] build: capturing new migrations. --- .github/workflows/capture_new_migrations.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/capture_new_migrations.yml b/.github/workflows/capture_new_migrations.yml index 869bb2afa4bd..fb87c77c28eb 100644 --- a/.github/workflows/capture_new_migrations.yml +++ b/.github/workflows/capture_new_migrations.yml @@ -141,6 +141,34 @@ jobs: - name: list installed package versions run: | pip freeze + + - name: Verify executed migrations on branch. + id: capture2 + run: | + query_result1=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp;) + echo "Query Result: $query_result1" + echo "query_result1=$query_result1" >> $GITHUB_ENV + + - name: Verify executed migrations on branch2. + id: capture2 + run: | + query_result1=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp;) + echo "Query Result: $query_result1" + echo "query_result1=$query_result1" >> $GITHUB_ENV + + - name: Verify difference + run: | + echo "echo ${{env.query_result}}" + echo "echo ${{env.query_result1}}" + number1=${{ env.query_result1 }} + number2=${{ env.query_result1 }} + # Perform subtraction + diff=$((number1 - number2)) + result=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select * from django_migrations ORDER by -id limit $diff ;" edxapp;) + echo "Query Result: $result" + echo "$result" + + - name: Run Tests env: LMS_CFG: lms/envs/minimal.yml