-
Notifications
You must be signed in to change notification settings - Fork 297
55 lines (53 loc) · 1.88 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Check
on:
workflow_dispatch:
pull_request:
paths:
- 'latest/**'
- 'ebusd-2.1.x/**'
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
-
name: checkout
uses: actions/checkout@v4
-
name: check validity
run: |
docker run -v $PWD:/cfg john30/ebusd --checkconfig -c /cfg/latest/de \
&& docker run -v $PWD:/cfg john30/ebusd --checkconfig -c /cfg/latest/en
-
name: dump json
run: |
docker run -v $PWD:/cfg john30/ebusd --dumpconfig=json --dumpconfigto=/cfg/de.json -c /cfg/latest/de \
&& docker run -v $PWD:/cfg john30/ebusd --dumpconfig=json --dumpconfigto=/cfg/en.json -c /cfg/latest/en
-
name: dump csv
run: |
docker run -v $PWD:/cfg john30/ebusd --dumpconfig -c /cfg/latest/de | sed -e 's#.*main notice. *##' > dump.de \
&& docker run -v $PWD:/cfg john30/ebusd --dumpconfig -c /cfg/latest/en | sed -e 's#.*main notice. *##' > dump.en
-
name: check count
run: |
(cd latest/de && find . -name "*.csv" -exec wc -l \{\} \;) > wc.de \
&& (cd latest/de && find . -name "*.inc" -exec wc -l \{\} \;) >> wc.de \
&& (cd latest/en && find . -name "*.csv" -exec wc -l \{\} \;) > wc.en \
&& (cd latest/en && find . -name "*.inc" -exec wc -l \{\} \;) >> wc.en \
diff wc.de wc.en
-
name: check names
run: |
sed -e 's#""##g' -e 's#,"[^"]*",#,,#g' dump.de|cut -d , -f 1,2,3,6,7,8 > norm.de \
&& sed -e 's#""##g' -e 's#,"[^"]*",#,,#g' dump.en|cut -d , -f 1,2,3,6,7,8 > norm.en \
&& diff norm.de norm.en
-
name: archive
uses: actions/upload-artifact@v4
with:
name: results
path: |
de.json en.json dump.de dump.en