Skip to content

Commit bf444c4

Browse files
Use ydiff instead of just diff for prettier output
1 parent 61a225f commit bf444c4

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/compare_script_to_course.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111

1212
jobs:
1313
compare:
14-
runs-on: ubuntu-latest
14+
runs-on: macos-latest
15+
env:
16+
YDIFF_OPTIONS: "--side-by-side --pager=cat --color=always --width=120 --nowrap"
1517

1618
steps:
1719
- name: Check out repo
@@ -22,6 +24,9 @@ jobs:
2224
with:
2325
python-version: "3.11"
2426

27+
- name: Install `ydiff` # https://github.com/ymattw/ydiff
28+
run: brew install ydiff
29+
2530
- name: Download remote text file
2631
run: |
2732
curl -L https://gist.githubusercontent.com/joshuacwnewton/3c554bf27111cf0020e5c124b66448c4/raw/ff08cbcf7738941008eca0fa54e024d98eea24e8/gistfile1.txt -o remote.txt
@@ -43,7 +48,8 @@ jobs:
4348
- name: Diff commands
4449
run: |
4550
echo "🔍 Diffing remote vs local..."
46-
diff -u local_cmds_sorted.txt remote_cmds_sorted.txt || true
51+
diff -u local_cmds_sorted.txt remote_cmds_sorted.txt > diff.txt || true
52+
ydiff < $DIFF_FILE
4753
4854
- name: Upload results as artifacts
4955
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)