From 8aafd0764d56f2ba738ab3e7a95f470a8477a30c Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 11:04:04 -0800 Subject: [PATCH 01/25] add step to comment on the pr --- .github/workflows/python-app-pr.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 925e0fd..1300e07 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -55,4 +55,11 @@ jobs: name: test-diff path: ./test-diff.html + - name: Comment PR with execution number + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + _(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_ + comment_tag: execution + From 3185bb20f02cb385cef2cc50fb70c1c8f77828d1 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 11:13:00 -0800 Subject: [PATCH 02/25] add permission to github action for commenting on pr --- .github/workflows/python-app-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 1300e07..b6c9e70 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -9,6 +9,7 @@ on: permissions: contents: read + pull-requests: write jobs: build: @@ -56,7 +57,7 @@ jobs: path: ./test-diff.html - name: Comment PR with execution number - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | _(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_ From 394b69df54d5f1acab4885338cb9b0923e80f424 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 11:31:59 -0800 Subject: [PATCH 03/25] include more information in pr comment --- .github/workflows/python-app-pr.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index b6c9e70..e8c1db2 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -40,6 +40,12 @@ jobs: with: workflow: python-app-dev.yml name: test-report + + - name: Extract number of failures and errors + id: extract_results + run: | + echo "test_dev=$(tail -2 ../output-dev.txt | head -1)" >> "$GITHUB_ENV" + echo "test_pr=$(tail -2 ../output-pr.txt | head -1)" >> "$GITHUB_ENV" - name: Setup Node (for diff) uses: actions/setup-node@v4 @@ -60,7 +66,8 @@ jobs: uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | - _(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_ + Test results from DEV: "$test_dev" + Test results from PR: "$test_pr" comment_tag: execution From d2d9091e3f005d7dd3c12d649ef7cf2f9df88d58 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 12:08:13 -0800 Subject: [PATCH 04/25] adding github step summary --- .github/workflows/python-app-pr.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index e8c1db2..37d279d 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -44,8 +44,11 @@ jobs: - name: Extract number of failures and errors id: extract_results run: | - echo "test_dev=$(tail -2 ../output-dev.txt | head -1)" >> "$GITHUB_ENV" - echo "test_pr=$(tail -2 ../output-pr.txt | head -1)" >> "$GITHUB_ENV" + echo "test_dev=$(tail -2 output-dev.txt | head -1)" >> "$GITHUB_ENV" + echo "test_pr=$(tail -2 output-pr.txt | head -1)" >> "$GITHUB_ENV" + echo 'test_results<> $GITHUB_STEP_SUMMARY + echo "$test_results" >> $GITHUB_STEP_SUMMARY + echo "```" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 with: name: test-diff path: ./test-diff.html - - name: Comment PR with execution number + - name: Comment on the PR uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | Test results from DEV: "$test_dev" Test results from PR: "$test_pr" + $GITHUB_STEP_SUMMARY comment_tag: execution From 9729ec161b11203c618738d85f0c07e909dccbba Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 12:18:46 -0800 Subject: [PATCH 05/25] fix multiline string --- .github/workflows/python-app-pr.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 37d279d..a97d57b 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -46,9 +46,11 @@ jobs: run: | echo "test_dev=$(tail -2 output-dev.txt | head -1)" >> "$GITHUB_ENV" echo "test_pr=$(tail -2 output-pr.txt | head -1)" >> "$GITHUB_ENV" - echo 'test_results< Date: Wed, 24 Jan 2024 12:23:52 -0800 Subject: [PATCH 06/25] fix multiline string --- .github/workflows/python-app-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index a97d57b..88b1fc1 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -50,7 +50,7 @@ jobs: echo "test_results<> "$GITHUB_ENV" - name: Setup Node (for diff) uses: actions/setup-node@v4 @@ -74,8 +74,8 @@ jobs: uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | - Test results from DEV: "$test_dev" - Test results from PR: "$test_pr" + Test results from DEV: $test_dev + Test results from PR: $test_pr $GITHUB_STEP_SUMMARY comment_tag: execution From b876c86c76677e0dc025e2e4f543e926a9065ae7 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 12:30:08 -0800 Subject: [PATCH 07/25] fix multiline string --- .github/workflows/python-app-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 88b1fc1..c3615d1 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -47,7 +47,7 @@ jobs: echo "test_dev=$(tail -2 output-dev.txt | head -1)" >> "$GITHUB_ENV" echo "test_pr=$(tail -2 output-pr.txt | head -1)" >> "$GITHUB_ENV" { - echo "test_results<> "$GITHUB_ENV" From d5481dcad9728aeb1129a837a2deb67729bdbae8 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 12:36:54 -0800 Subject: [PATCH 08/25] fix multiline string --- .github/workflows/python-app-pr.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index c3615d1..4c921e8 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -44,8 +44,6 @@ jobs: - name: Extract number of failures and errors id: extract_results run: | - echo "test_dev=$(tail -2 output-dev.txt | head -1)" >> "$GITHUB_ENV" - echo "test_pr=$(tail -2 output-pr.txt | head -1)" >> "$GITHUB_ENV" { echo 'test_results< Date: Wed, 24 Jan 2024 12:53:38 -0800 Subject: [PATCH 09/25] fix multiline string --- .github/workflows/python-app-pr.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 4c921e8..e49acc6 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -40,6 +40,15 @@ jobs: with: workflow: python-app-dev.yml name: test-report + + - name: Set the value in bash + id: step_one + run: | + { + echo 'JSON_RESPONSE<> "$GITHUB_ENV" - name: Extract number of failures and errors id: extract_results From 85312a2d967c3aa39252f2821abf4737ed87ca0c Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 13:00:45 -0800 Subject: [PATCH 10/25] fix multiline string --- .github/workflows/python-app-pr.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index e49acc6..5a261d0 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -40,23 +40,14 @@ jobs: with: workflow: python-app-dev.yml name: test-report - - - name: Set the value in bash - id: step_one - run: | - { - echo 'JSON_RESPONSE<> "$GITHUB_ENV" - name: Extract number of failures and errors id: extract_results run: | { - echo 'test_results<> "$GITHUB_ENV" - name: Setup Node (for diff) From 74079a371effe6f837495527b7b3a528bec72b63 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 13:53:33 -0800 Subject: [PATCH 11/25] fix multiline string --- .github/workflows/python-app-pr.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 5a261d0..5a3ba81 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -41,13 +41,17 @@ jobs: workflow: python-app-dev.yml name: test-report + - name: Print diff + run: | + diff -u output-dev.txt output-pr.txt + - name: Extract number of failures and errors id: extract_results run: | { - echo 'test_results<> "$GITHUB_ENV" - name: Setup Node (for diff) @@ -72,6 +76,8 @@ jobs: uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | + Test results from DEV: $test_dev + Test results from PR: $test_pr $GITHUB_STEP_SUMMARY comment_tag: execution From 64aa7a3683cbcb846038a291e483baa635af3875 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 14:04:17 -0800 Subject: [PATCH 12/25] diff returns 1 if files are diffrent which causes job to abort -- modify script to ignore diff exit code --- .github/workflows/python-app-pr.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 5a3ba81..2067030 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -41,16 +41,12 @@ jobs: workflow: python-app-dev.yml name: test-report - - name: Print diff - run: | - diff -u output-dev.txt output-pr.txt - - name: Extract number of failures and errors id: extract_results run: | { echo 'test_results<> "$GITHUB_ENV" From 7d34bb0a1abfd92ffe00d312ba71af59c456529f Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 14:33:45 -0800 Subject: [PATCH 13/25] testing github step summary --- .github/workflows/python-app-pr.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 2067030..1019314 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -56,12 +56,15 @@ jobs: node-version: 20 - run: npm install -g diff2html-cli - - name: Compare test results - run: | - diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html - echo "```diff" >> $GITHUB_STEP_SUMMARY - echo "$test_results" >> $GITHUB_STEP_SUMMARY - echo "```" >> $GITHUB_STEP_SUMMARY + # - name: Compare test results + # run: | + # diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html + # echo "```diff" >> $GITHUB_STEP_SUMMARY + # echo "$test_results" >> $GITHUB_STEP_SUMMARY + # echo "```" >> $GITHUB_STEP_SUMMARY + + - name: Adding markdown + run: echo '### Hello world! 🚀' >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 with: @@ -74,7 +77,6 @@ jobs: message: | Test results from DEV: $test_dev Test results from PR: $test_pr - $GITHUB_STEP_SUMMARY comment_tag: execution From ec01a4619181fde010647d653fbba8d48a9aa1d8 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 14:50:54 -0800 Subject: [PATCH 14/25] testing github step summary --- .github/workflows/python-app-pr.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 1019314..4eea4de 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -45,7 +45,7 @@ jobs: id: extract_results run: | { - echo 'test_results<> "$GITHUB_ENV" @@ -56,15 +56,10 @@ jobs: node-version: 20 - run: npm install -g diff2html-cli - # - name: Compare test results - # run: | - # diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html - # echo "```diff" >> $GITHUB_STEP_SUMMARY - # echo "$test_results" >> $GITHUB_STEP_SUMMARY - # echo "```" >> $GITHUB_STEP_SUMMARY - - - name: Adding markdown - run: echo '### Hello world! 🚀' >> $GITHUB_STEP_SUMMARY + - name: Compare test results + run: | + diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html + printf '%s\n' "```diff\n$test_results\n```" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 with: From ec2d711adbaebf4c839fd11c2f251fcf0c0899ba Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 14:58:37 -0800 Subject: [PATCH 15/25] testing github step summary --- .github/workflows/python-app-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 4eea4de..b6a8ec3 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -59,7 +59,7 @@ jobs: - name: Compare test results run: | diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html - printf '%s\n' "```diff\n$test_results\n```" >> $GITHUB_STEP_SUMMARY + printf '%s\n' "\`\`\`diff\n$test_results\n\`\`\`" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 with: From bfbe2b5c320c0e1f137d539ed6892247a606e1d6 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 21:11:39 -0800 Subject: [PATCH 16/25] testing github step summary --- .github/workflows/python-app-pr.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index b6a8ec3..c005d83 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -44,22 +44,18 @@ jobs: - name: Extract number of failures and errors id: extract_results run: | + tr '\r' '\n' < output-dev.txt > old.txt + tr '\r' '\n' < output-pr.txt > new.txt + tail -n +53 old.txt + tail -n +53 new.txt + { - echo "test_results<> "$GITHUB_ENV" - - - name: Setup Node (for diff) - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm install -g diff2html-cli - - - name: Compare test results - run: | - diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html - printf '%s\n' "\`\`\`diff\n$test_results\n\`\`\`" >> $GITHUB_STEP_SUMMARY + + printf '%s\n' "\`\`\`diff\n$TEST_RESULTS\n\`\`\`" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 with: @@ -69,9 +65,7 @@ jobs: - name: Comment on the PR uses: thollander/actions-comment-pull-request@v2.4.3 with: - message: | - Test results from DEV: $test_dev - Test results from PR: $test_pr + message: ${{ env.TEST_RESULTS }} comment_tag: execution From 81b10843608b9fef4faea6d0ea7f3cc3cc71ab2c Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 21:29:43 -0800 Subject: [PATCH 17/25] testing github step summary --- .github/workflows/python-app-pr.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index c005d83..8e22d8c 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -48,24 +48,20 @@ jobs: tr '\r' '\n' < output-pr.txt > new.txt tail -n +53 old.txt tail -n +53 new.txt - { echo "TEST_RESULTS<> "$GITHUB_ENV" - + + - name: Update build summary + run: | printf '%s\n' "\`\`\`diff\n$TEST_RESULTS\n\`\`\`" >> $GITHUB_STEP_SUMMARY - - - uses: actions/upload-artifact@v4 - with: - name: test-diff - path: ./test-diff.html - name: Comment on the PR uses: thollander/actions-comment-pull-request@v2.4.3 with: - message: ${{ env.TEST_RESULTS }} + message: \`\`\`diff\n${{ env.TEST_RESULTS }}\n\`\`\` comment_tag: execution From 0475e53dfa2d55ea4154d9f8016588519d6cef22 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 21:33:35 -0800 Subject: [PATCH 18/25] testing github step summary --- .github/workflows/python-app-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 8e22d8c..58f18c0 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -46,8 +46,8 @@ jobs: run: | tr '\r' '\n' < output-dev.txt > old.txt tr '\r' '\n' < output-pr.txt > new.txt - tail -n +53 old.txt - tail -n +53 new.txt + tail -n +53 old.txt > tmp.txt && mv tmp.txt old.txt + tail -n +53 new.txt > tmp.txt && mv tmp.txt new.txt { echo "TEST_RESULTS< Date: Wed, 24 Jan 2024 21:49:32 -0800 Subject: [PATCH 19/25] testing github step summary --- .github/workflows/python-app-pr.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 58f18c0..e5dd58f 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -42,12 +42,13 @@ jobs: name: test-report - name: Extract number of failures and errors - id: extract_results run: | tr '\r' '\n' < output-dev.txt > old.txt tr '\r' '\n' < output-pr.txt > new.txt tail -n +53 old.txt > tmp.txt && mv tmp.txt old.txt tail -n +53 new.txt > tmp.txt && mv tmp.txt new.txt + sed -n '/=============/q;p' old.txt + sed -n '/=============/q;p' new.txt { echo "TEST_RESULTS< Date: Wed, 24 Jan 2024 21:57:11 -0800 Subject: [PATCH 20/25] testing github step summary --- .github/workflows/python-app-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index e5dd58f..c861a37 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -47,8 +47,8 @@ jobs: tr '\r' '\n' < output-pr.txt > new.txt tail -n +53 old.txt > tmp.txt && mv tmp.txt old.txt tail -n +53 new.txt > tmp.txt && mv tmp.txt new.txt - sed -n '/=============/q;p' old.txt - sed -n '/=============/q;p' new.txt + sed -i -n '/======================================================================/q;p' old.txt + sed -i -n '/======================================================================/q;p' new.txt { echo "TEST_RESULTS< Date: Wed, 24 Jan 2024 22:08:08 -0800 Subject: [PATCH 21/25] testing github step summary --- .github/workflows/python-app-pr.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index c861a37..0d683ac 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -47,6 +47,8 @@ jobs: tr '\r' '\n' < output-pr.txt > new.txt tail -n +53 old.txt > tmp.txt && mv tmp.txt old.txt tail -n +53 new.txt > tmp.txt && mv tmp.txt new.txt + echo "OLD=$(tail -n 2 old.txt | head -n 1)" >> $GITHUB_ENV + echo "NEW=$(tail -n 2 new.txt | head -n 1)" >> $GITHUB_ENV sed -i -n '/======================================================================/q;p' old.txt sed -i -n '/======================================================================/q;p' new.txt { @@ -57,7 +59,13 @@ jobs: - name: Update build summary run: | - printf '%s\n' "\`\`\`diff\n$TEST_RESULTS\n\`\`\`" >> $GITHUB_STEP_SUMMARY + { + echo "\`\`\`diff" + echo "$TEST_RESULTS" + echo "DEV BRANCH: $OLD" + echo "PR BRANCH: $NEW" + echo "\`\`\`" + } >> $GITHUB_STEP_SUMMARY - name: Comment on the PR uses: thollander/actions-comment-pull-request@v2.4.3 From 2d1957fe85cdb1e26cc962021371132b397036fb Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 22:15:39 -0800 Subject: [PATCH 22/25] testing github step summary --- .github/workflows/python-app-pr.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 0d683ac..f2642c7 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -43,17 +43,17 @@ jobs: - name: Extract number of failures and errors run: | - tr '\r' '\n' < output-dev.txt > old.txt - tr '\r' '\n' < output-pr.txt > new.txt - tail -n +53 old.txt > tmp.txt && mv tmp.txt old.txt - tail -n +53 new.txt > tmp.txt && mv tmp.txt new.txt - echo "OLD=$(tail -n 2 old.txt | head -n 1)" >> $GITHUB_ENV - echo "NEW=$(tail -n 2 new.txt | head -n 1)" >> $GITHUB_ENV - sed -i -n '/======================================================================/q;p' old.txt - sed -i -n '/======================================================================/q;p' new.txt + tr '\r' '\n' < output-dev.txt > dev.txt + tr '\r' '\n' < output-pr.txt > pr.txt + tail -n +53 dev.txt > tmp.txt && mv tmp.txt dev.txt + tail -n +53 pr.txt > tmp.txt && mv tmp.txt pr.txt + echo "DEV=$(tail -n 2 dev.txt | head -n 1)" >> $GITHUB_ENV + echo "PR=$(tail -n 2 pr.txt | head -n 1)" >> $GITHUB_ENV + sed -i -n '/======================================================================/q;p' dev.txt + sed -i -n '/======================================================================/q;p' pr.txt { echo "TEST_RESULTS<> "$GITHUB_ENV" @@ -62,8 +62,9 @@ jobs: { echo "\`\`\`diff" echo "$TEST_RESULTS" - echo "DEV BRANCH: $OLD" - echo "PR BRANCH: $NEW" + echo "" + echo "DEV BRANCH: $DEV" + echo "PR BRANCH: $PR" echo "\`\`\`" } >> $GITHUB_STEP_SUMMARY @@ -73,6 +74,9 @@ jobs: message: | ```diff ${{ env.TEST_RESULTS }} + + DEV BRANCH: ${{ env.DEV }} + PR BRANCH: ${{ env.PR }} ``` comment_tag: execution From e934c148bf17db81b9f673d87004f555d656efe6 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 22:25:51 -0800 Subject: [PATCH 23/25] testing github step summary --- .github/workflows/python-app-pr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index f2642c7..065e82a 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -63,8 +63,8 @@ jobs: echo "\`\`\`diff" echo "$TEST_RESULTS" echo "" - echo "DEV BRANCH: $DEV" - echo "PR BRANCH: $PR" + echo "old.txt - DEV BRANCH: $DEV" + echo "pr.txt - PR BRANCH: $PR" echo "\`\`\`" } >> $GITHUB_STEP_SUMMARY @@ -72,11 +72,11 @@ jobs: uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | + **old.txt - DEV BRANCH: ${{ env.DEV }}** + **pr.txt - PR BRANCH: ${{ env.PR }}** + ```diff ${{ env.TEST_RESULTS }} - - DEV BRANCH: ${{ env.DEV }} - PR BRANCH: ${{ env.PR }} ``` comment_tag: execution From ea7e269b588a466fdc656475cb00f5e31f47a12b Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 22:28:43 -0800 Subject: [PATCH 24/25] testing github step summary --- .github/workflows/python-app-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 065e82a..9b54bbe 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -63,7 +63,7 @@ jobs: echo "\`\`\`diff" echo "$TEST_RESULTS" echo "" - echo "old.txt - DEV BRANCH: $DEV" + echo "dev.txt - DEV BRANCH: $DEV" echo "pr.txt - PR BRANCH: $PR" echo "\`\`\`" } >> $GITHUB_STEP_SUMMARY @@ -72,7 +72,7 @@ jobs: uses: thollander/actions-comment-pull-request@v2.4.3 with: message: | - **old.txt - DEV BRANCH: ${{ env.DEV }}** + **dev.txt - DEV BRANCH: ${{ env.DEV }}** **pr.txt - PR BRANCH: ${{ env.PR }}** ```diff From cd67a315dc1d374b3434089c0f3c1fcb4b4d4e60 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 24 Jan 2024 22:33:15 -0800 Subject: [PATCH 25/25] testing github step summary --- .github/workflows/python-app-pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-app-pr.yml b/.github/workflows/python-app-pr.yml index 9b54bbe..79049fc 100644 --- a/.github/workflows/python-app-pr.yml +++ b/.github/workflows/python-app-pr.yml @@ -60,11 +60,11 @@ jobs: - name: Update build summary run: | { + echo "dev.txt - DEV BRANCH: $DEV" + echo "pr.txt - PR BRANCH: $PR" + echo "" echo "\`\`\`diff" echo "$TEST_RESULTS" - echo "" - echo "dev.txt - DEV BRANCH: $DEV" - echo "pr.txt - PR BRANCH: $PR" echo "\`\`\`" } >> $GITHUB_STEP_SUMMARY @@ -73,7 +73,7 @@ jobs: with: message: | **dev.txt - DEV BRANCH: ${{ env.DEV }}** - **pr.txt - PR BRANCH: ${{ env.PR }}** + **pr.txt - PR BRANCH: ${{ env.PR }}** ```diff ${{ env.TEST_RESULTS }}