@@ -104,6 +104,15 @@ jobs:
104104 path : ~/.cache/pre-commit/
105105 key : pre-commit-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
106106
107+ - name : Cache enwik8 dataset
108+ uses : actions/cache@v4
109+ with :
110+ path : build/enwik8.zip
111+ key : enwik8-dataset-${{ hashFiles('Makefile') }}
112+
113+ - name : Download enwik8 dataset
114+ run : make download-enwik8
115+
107116 - name : Pre-commit run
108117 run : |
109118 source ${{ env.ACTIVATE_PYTHON_VENV }}
@@ -116,6 +125,23 @@ jobs:
116125 belay run micropython -X heapsize=200M -m unittest tests/*.py
117126 coverage report
118127
128+ - name : Verify CLI compression/decompression integrity
129+ run : |
130+ source ${{ env.ACTIVATE_PYTHON_VENV }}
131+ make download-enwik8
132+ original_hash=$(sha256sum build/enwik8 | cut -d' ' -f1)
133+ roundtrip_hash=$(tamp compress build/enwik8 | tamp decompress | sha256sum | cut -d' ' -f1)
134+ if [ "$original_hash" = "$roundtrip_hash" ]; then
135+ echo "✓ Compression/decompression integrity verified"
136+ echo "Original hash: $original_hash"
137+ echo "Roundtrip hash: $roundtrip_hash"
138+ else
139+ echo "✗ Compression/decompression integrity check failed"
140+ echo "Original hash: $original_hash"
141+ echo "Roundtrip hash: $roundtrip_hash"
142+ exit 1
143+ fi
144+
119145 - name : Upload coverage to Codecov
120146 if : steps.check_test_files.outputs.files_exists == 'true'
121147 uses : codecov/codecov-action@v4
0 commit comments