Skip to content

Commit 24d45cb

Browse files
authored
chore: document and ignore data inconsistency (#145)
1 parent 01ac942 commit 24d45cb

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/health-check-integrity.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,22 @@ jobs:
117117
run: |
118118
cd api/emission/co2
119119
120+
cat << EOF > .ignore-grep
121+
2025/11/21/DK1.json has incorrect duration: 82500
122+
2025/11/23/DK1.json has incorrect duration: 3300
123+
2025/11/21/DK2.json has incorrect duration: 82500
124+
2025/11/23/DK2.json has incorrect duration: 3300
125+
EOF
126+
120127
find 2??? -type f -mindepth 3 -maxdepth 3 -name "${{ matrix.zone }}.json" | sort | tail -n +2 | head -n-1 | while read file; do
121128
duration=$(jq '[.[].timestamp] | max as $max | min as $min | $max - $min' < $file)
122129
if [ $duration != 86100 ]; then
123130
echo "$file has incorrect duration: $duration"
124131
fi
125-
done | tee ../../../${{ matrix.zone }}
132+
done | tee ../../../${{ matrix.zone }}.raw
133+
echo "--- filtered output below ---"
134+
cat ../../../${{ matrix.zone }}.raw | (grep -vf .ignore-grep || true) > ../../../${{ matrix.zone }}
135+
126136
- uses: actions/upload-artifact@v6
127137
with:
128138
name: emission-${{ matrix.zone }}

0 commit comments

Comments
 (0)