small improvements
This commit is contained in:
parent
91e590bb9a
commit
ffb5323755
|
@ -11,14 +11,13 @@ jobs:
|
||||||
- name: install OpenRefine and openrefine-client
|
- name: install OpenRefine and openrefine-client
|
||||||
run: |
|
run: |
|
||||||
mkdir -p output .openrefine .openrefine/data
|
mkdir -p output .openrefine .openrefine/data
|
||||||
cd .openrefine
|
wget --no-verbose -O openrefine.tar.gz https://github.com/OpenRefine/OpenRefine/releases/download/3.5.2/openrefine-linux-3.5.2.tar.gz
|
||||||
wget -q -O openrefine.tar.gz https://github.com/OpenRefine/OpenRefine/releases/download/3.5.0/openrefine-linux-3.5.0.tar.gz
|
tar -xzf openrefine.tar.gz -C .openrefine --strip 1 && rm openrefine.tar.gz
|
||||||
tar -xzf openrefine.tar.gz --strip 1
|
sed -i 's/cd `dirname $0`/cd "$(dirname "$0")"/' ".openrefine/refine" # fix path issue in OpenRefine startup file
|
||||||
sed -i '$ a JAVA_OPTIONS=-Drefine.headless=true' refine.ini # do not try to open OpenRefine in browser
|
sed -i '$ a JAVA_OPTIONS=-Drefine.headless=true' ".openrefine/refine.ini" # do not try to open OpenRefine in browser
|
||||||
sed -i 's/#REFINE_AUTOSAVE_PERIOD=60/REFINE_AUTOSAVE_PERIOD=1440/' refine.ini # set autosave period from 5 minutes to 25 hours
|
sed -i 's/#REFINE_AUTOSAVE_PERIOD=60/REFINE_AUTOSAVE_PERIOD=1440/' ".openrefine/refine.ini" # set autosave period from 5 minutes to 25 hours
|
||||||
wget -q -O client https://github.com/opencultureconsulting/openrefine-client/releases/download/v0.3.10/openrefine-client_0-3-10_linux
|
wget --no-verbose -O .openrefine/client https://github.com/opencultureconsulting/openrefine-client/releases/download/v0.3.10/openrefine-client_0-3-10_linux
|
||||||
chmod +x client
|
chmod +x .openrefine/client
|
||||||
cd -
|
|
||||||
- name: start OpenRefine
|
- name: start OpenRefine
|
||||||
run: |
|
run: |
|
||||||
.openrefine/refine -m 5120M -v warn -d data >> .openrefine/log.txt 2>&1 &
|
.openrefine/refine -m 5120M -v warn -d data >> .openrefine/log.txt 2>&1 &
|
||||||
|
@ -43,27 +42,26 @@ jobs:
|
||||||
- name: stop OpenRefine
|
- name: stop OpenRefine
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
PID=$(lsof -t -i:3333)
|
PID="$(lsof -t -i:3333)"
|
||||||
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > >(tee -a .openrefine/log.txt) 2>&1
|
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > >(tee -a .openrefine/log.txt) 2>&1
|
||||||
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > >(tee -a .openrefine/log.txt) 2>&1
|
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > >(tee -a .openrefine/log.txt) 2>&1
|
||||||
kill $PID; while ps -p $PID > /dev/null; do sleep 1; done
|
kill $PID; while ps -p $PID > /dev/null; do sleep 1; done
|
||||||
- name: archive OpenRefine projects
|
- name: archive OpenRefine projects
|
||||||
if: always()
|
if: always()
|
||||||
run: for p in .openrefine/data/*/; do tar cfz .openrefine/data/"${p:17:13}.openrefine.tar.gz" -C $p .; done
|
run: for p in .openrefine/data/*.project/; do tar cfz .openrefine/data/"${p:17:13}.openrefine.tar.gz" -C $p .; done
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: OpenRefine project(s)
|
name: OpenRefine project(s)
|
||||||
path: .openrefine/data/*.openrefine.tar.gz
|
path: .openrefine/data/*.openrefine.tar.gz
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: check logfile for any warnings
|
- name: check log file
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
if grep -i 'exception\|error' .openrefine/log.txt
|
if grep -i 'exception\|error' .openrefine/log.txt
|
||||||
then echo 1>&2 "log contains warnings!"; echo; cat .openrefine/log.txt; exit 1;
|
then echo 1>&2 "log contains warnings!"; echo; cat .openrefine/log.txt; exit 1
|
||||||
else echo "log seems to be ok"; echo; cat .openrefine/log.txt
|
|
||||||
fi
|
fi
|
||||||
- name: commit and push if output changed
|
- name: commit and push if something changed
|
||||||
run: |-
|
run: |-
|
||||||
git config user.name "Automated"
|
git config user.name "Automated"
|
||||||
git config user.email "actions@users.noreply.github.com"
|
git config user.email "actions@users.noreply.github.com"
|
Loading…
Reference in New Issue