Skip to content

Commit

Permalink
reorder, add debian
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Jun 19, 2024
1 parent e34abfa commit 0296075
Showing 1 changed file with 79 additions and 39 deletions.
118 changes: 79 additions & 39 deletions .github/workflows/test_run_qna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,21 @@ on:
env:
relevance: ( (it as string) of operating system ; (it as string) of version of client ; elements of it ) of sets of pathnames of (files of it; folders of it) of folders ("/tmp";"/Windows/Temp")

# TODO: add OSes: Debian, Raspbian, Amazon Linux, SUSE Linux Enterprise, OpenSUSE Leap
jobs:
test_run_qna_docker_rhel_family:
runs-on: ubuntu-latest
strategy:
matrix:
container-image:
[
"redhat/ubi8:latest",
"redhat/ubi9:latest",
"almalinux:latest",
"oraclelinux:9",
"rockylinux:9",
]
container:
image: ${{ matrix.container-image }}
steps:
- uses: actions/checkout@v4
# https://stackoverflow.com/questions/57946173/github-actions-run-step-on-specific-os
- name: install cpio
run: dnf --assumeyes install cpio
- name: run qna linux rhel
if: runner.os == 'Linux'
# https://github.com/jgstew/tools/blob/master/bash/bigfix_run_qna_debian.sh
run: |
bash bash/bigfix_run_qna_rhel_family.sh '${{ env.relevance }}' > qna_output.txt
cat qna_output.txt
cat qna_output.txt | grep "A: " | sed 's/^.*: //' > qna_markdown.txt
echo "## Linux RHEL Family QNA:" >> $GITHUB_STEP_SUMMARY
echo "### Errors:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "E: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Result Type:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "I: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Time Taken:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "T: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Answers:" >> $GITHUB_STEP_SUMMARY
echo 'Q: `${{ env.relevance }}`' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat qna_markdown.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
test_run_qna:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os:
[
macos-latest,
windows-latest,
windows-2019,
ubuntu-24.04,
ubuntu-22.04,
ubuntu-20.04,
]
steps:
- uses: actions/checkout@v4
# https://stackoverflow.com/questions/57946173/github-actions-run-step-on-specific-os
Expand Down Expand Up @@ -121,6 +92,75 @@ jobs:
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
test_run_qna_docker_rhel_family:
runs-on: ubuntu-latest
strategy:
matrix:
container-image:
[
"redhat/ubi8:latest",
"redhat/ubi9:latest",
"almalinux:latest",
"oraclelinux:9",
"rockylinux:9",
]
container:
image: ${{ matrix.container-image }}
steps:
- uses: actions/checkout@v4
# https://stackoverflow.com/questions/57946173/github-actions-run-step-on-specific-os
- name: install cpio
run: dnf --assumeyes install cpio
- name: run qna linux rhel
if: runner.os == 'Linux'
# https://github.com/jgstew/tools/blob/master/bash/bigfix_run_qna_debian.sh
run: |
bash bash/bigfix_run_qna_rhel_family.sh '${{ env.relevance }}' > qna_output.txt
cat qna_output.txt
cat qna_output.txt | grep "A: " | sed 's/^.*: //' > qna_markdown.txt
echo "## Linux RHEL Family QNA:" >> $GITHUB_STEP_SUMMARY
echo "### Errors:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "E: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Result Type:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "I: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Time Taken:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "T: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Answers:" >> $GITHUB_STEP_SUMMARY
echo 'Q: `${{ env.relevance }}`' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat qna_markdown.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
test_run_qna_docker_debian:
runs-on: ubuntu-latest
strategy:
matrix:
container-image: ["debian:trixie", "debian:stable", "debian:latest"]
container:
image: ${{ matrix.container-image }}
steps:
- uses: actions/checkout@v4
# https://stackoverflow.com/questions/57946173/github-actions-run-step-on-specific-os
- name: run qna linux
if: runner.os == 'Linux'
# https://github.com/jgstew/tools/blob/master/bash/bigfix_run_qna_debian.sh
run: |
bash bash/bigfix_run_qna_debian.sh '${{ env.relevance }}' > qna_output.txt
cat qna_output.txt
cat qna_output.txt | grep "A: " | sed 's/^.*: //' > qna_markdown.txt
echo "## Linux Debian QNA:" >> $GITHUB_STEP_SUMMARY
echo "### Errors:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "E: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Result Type:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "I: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Time Taken:" >> $GITHUB_STEP_SUMMARY
cat qna_output.txt | grep "T: " | sed 's/^.*: //' >> $GITHUB_STEP_SUMMARY
echo "### Answers:" >> $GITHUB_STEP_SUMMARY
echo 'Q: `${{ env.relevance }}`' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat qna_markdown.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
# References:
# - https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary
# - https://stackoverflow.com/questions/61326842/powershell-how-to-capture-a-string-of-text-after-a-certain-pattern-but-without-i
Expand Down

0 comments on commit 0296075

Please sign in to comment.