Implement VWZ Live Monitor readings & Test Menu #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- ready_for_review | |
- labeled | |
- review_requested | |
paths: | |
- 'latest/**' | |
- 'ebusd-2.1.x/**' | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
env: | |
image: john30/ebusd:devel | |
folder: latest | |
steps: | |
- | |
name: checkout | |
uses: actions/checkout@v4 | |
- | |
name: pull image | |
run: docker pull $image | |
- | |
name: check validity | |
run: | | |
docker run -v $PWD:/cfg $image --checkconfig -c /cfg/$folder/de \ | |
&& docker run -v $PWD:/cfg $image --checkconfig -c /cfg/$folder/en | |
- name: check templates | |
run: | | |
(cd $folder/de && find . -name "_templates.csv" -exec cut -d ',' -f 1-3 \{\} \;) | sed -e 's#-So#-Su#g' > templ.de \ | |
&& (cd $folder/en && find . -name "_templates.csv" -exec cut -d ',' -f 1-3 \{\} \;) > templ.en \ | |
&& diff templ.de templ.en | |
- | |
name: dump json | |
run: | | |
docker run -v $PWD:/cfg $image --dumpconfig=json --dumpconfigto=/cfg/de.json -c /cfg/$folder/de \ | |
&& docker run -v $PWD:/cfg $image --dumpconfig=json --dumpconfigto=/cfg/en.json -c /cfg/$folder/en | |
- | |
name: dump csv | |
run: | | |
docker run -v $PWD:/cfg $image --dumpconfig -c /cfg/$folder/de | sed -e 's#.*main notice. *##' > dump.de \ | |
&& docker run -v $PWD:/cfg $image --dumpconfig -c /cfg/$folder/en | sed -e 's#.*main notice. *##' > dump.en | |
- | |
name: check count | |
run: | | |
(cd $folder/de && find . -name "*.csv" -exec wc -l \{\} \;) > wc.de \ | |
&& (cd $folder/de && find . -name "*.inc" -exec wc -l \{\} \;) >> wc.de \ | |
&& (cd $folder/en && find . -name "*.csv" -exec wc -l \{\} \;) > wc.en \ | |
&& (cd $folder/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: | | |
dump.de | |
dump.en | |