File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Validate CSV
2-
1+ name : " Validate CSV"
32on :
43 push :
54 paths :
6- - ' daily-log.csv'
5+ - " daily-log.csv"
76 pull_request :
87 paths :
9- - ' daily-log.csv'
8+ - " daily-log.csv"
109
1110jobs :
1211 validate :
1312 runs-on : ubuntu-latest
1413 steps :
15- - uses : actions/checkout@v4
16- - name : Set up Python
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Python
1718 uses : actions/setup-python@v4
1819 with :
19- python-version : ' 3.x'
20+ python-version : " 3.x"
21+
2022 - name : Validate CSV
21- run : |
22- python3 scripts/validate_csv.py
23+ run : python3 scripts/validate_csv.py
Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+ p = Path ('.github/workflows/validate-csv.yml' )
3+ if not p .exists ():
4+ print ('file not found' )
5+ raise SystemExit (1 )
6+ b = p .read_bytes ()
7+ lines = b .splitlines (True )
8+ for i ,line in enumerate (lines , start = 1 ):
9+ print (f'LINE { i } : { line !r} ' )
10+ print ('BYTES:' , ' ' .join (f"{ c :02x} " for c in line ))
11+ if i >= 5 :
12+ break
You can’t perform that action at this time.
0 commit comments