Skip to content

Commit 400aac0

Browse files
authored
CI: Check DVC isexec metadata in "Style Checks" workflow (#4615)
* Add style check for DVC executable PNG metadata * Remove executable metadata from baseline DVC files
1 parent 04b8a63 commit 400aac0

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/style_checks.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,14 @@ jobs:
6666
rm output.txt
6767
exit $nfiles
6868
fi
69+
70+
- name: Ensure baseline PNG DVC metadata does not mark files executable
71+
run: |
72+
grep -l '^[[:space:]]*isexec:[[:space:]]*true$' pygmt/tests/baseline/*.png.dvc > output.txt || true
73+
nfiles=$(wc --lines output.txt | awk '{print $1}')
74+
if [[ $nfiles > 0 ]]; then
75+
echo "The following baseline PNG DVC files mark images as executable:"
76+
cat output.txt
77+
rm output.txt
78+
exit $nfiles
79+
fi
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
outs:
22
- md5: 4d20cdb71af2e6568f64f0246ec860ea
33
size: 64008
4-
isexec: true
54
hash: md5
65
path: test_grdcontour_multiple_levels.png
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
outs:
22
- md5: fc624766f0b8eac8206735a05c7c9662
33
size: 45023
4-
isexec: true
54
hash: md5
65
path: test_grdcontour_one_level.png

0 commit comments

Comments
 (0)