Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Feb 26, 2024
1 parent 2a4d199 commit 45b9517
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
path: tmp
key: cred-data-${{ hashFiles('snapshot.yaml') }}

- name: install ansi2html
run: sudo apt update && sudo apt install colorized-logs

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -42,8 +45,7 @@ jobs:
git config --global init.defaultBranch work
python download_data.py --data_dir data
python review_data.py &>review_head.txt
apt install colorized-logs
cat review_head.txt | ansi2html >review_head.html
ansi2html --style 'pre {font-family: monospace; font-size: large}' <review_head.txt >review_head.html
- name: Upload artifact
if: always()
Expand Down Expand Up @@ -76,6 +78,9 @@ jobs:
path: tmp
key: cred-data-${{ hashFiles('snapshot.yaml') }}

- name: install ansi2html
run: sudo apt update && sudo apt install colorized-logs

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -87,8 +92,7 @@ jobs:
python -m pip install --requirement requirements.txt
python download_data.py --data_dir data
python review_data.py &>review_base.txt
apt install colorized-logs
cat review_base.txt | ansi2html >review_base.html
ansi2html --style 'pre {font-family: monospace; font-size: large}' <review_base.txt >review_base.html
- name: Upload artifact
if: always()
Expand All @@ -109,15 +113,17 @@ jobs:

steps:

- name: install ansi2html
run: sudo apt update && sudo apt install colorized-logs

- name: Download all workflow run artifacts
uses: actions/download-artifact@v4

- name: Get diff for review
run: |
# in case of difference - diff returns failure
if ! diff --color=always review_base/review_base.txt review_head/review_head.txt &>review_diff.txt; then
apt install colorized-logs
cat review_diff.txt | ansi2html >review_diff.html
ansi2html --style 'pre {font-family: monospace; font-size: large}' <review_diff.txt >review_diff.html
else
touch review_diff.html
fi
Expand Down

0 comments on commit 45b9517

Please sign in to comment.