Skip to content

Commit

Permalink
re arrange yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Jun 14, 2023
1 parent 19d5c6a commit 668b33e
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/test_run_qna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ jobs:
steps:
- uses: actions/checkout@v3
# https://stackoverflow.com/questions/57946173/github-actions-run-step-on-specific-os
- name: run qna windows
if: runner.os == 'Windows'
# https://github.com/jgstew/tools/blob/master/CMD/bigfix_run_qna_win.bat
run: |
echo '${{ env.relevance }}' | CMD /C CMD\bigfix_run_qna_win.bat > qna_output.txt
cat qna_output.txt
cat qna_output.txt | Select-String -Pattern "A: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } > qna_markdown.txt
echo "## Windows QNA:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Errors:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_output.txt | Select-String -Pattern "E: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Result Type:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_output.txt | Select-String -Pattern "I: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Time Taken:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_output.txt | Select-String -Pattern "T: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Answers:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "``````" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_markdown.txt | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "``````" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
- name: run qna linux
if: runner.os == 'Linux'
# https://github.com/jgstew/tools/blob/master/bash/bigfix_run_qna_debian.sh
Expand Down Expand Up @@ -77,6 +59,24 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
cat qna_markdown.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: run qna windows
if: runner.os == 'Windows'
# https://github.com/jgstew/tools/blob/master/CMD/bigfix_run_qna_win.bat
run: |
echo '${{ env.relevance }}' | CMD /C CMD\bigfix_run_qna_win.bat > qna_output.txt
cat qna_output.txt
cat qna_output.txt | Select-String -Pattern "A: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } > qna_markdown.txt
echo "## Windows QNA:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Errors:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_output.txt | Select-String -Pattern "E: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Result Type:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_output.txt | Select-String -Pattern "I: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Time Taken:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_output.txt | Select-String -Pattern "T: (.+)" | % { $_.Matches } | % { "" + $_.Groups[1].Value } | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "### Answers:" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "``````" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
cat qna_markdown.txt | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
echo "``````" | Out-File -FilePath $Env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
# References:
# - https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary
Expand Down

0 comments on commit 668b33e

Please sign in to comment.