Skip to content

Move a note that was breaking a multiline command #1375

Move a note that was breaking a multiline command

Move a note that was breaking a multiline command #1375

Workflow file for this run

name: QGIS 3_8_3 unit and integration test
on:
push:
branches:
- '**'
schedule:
- cron: "0 1 * * *"
jobs:
Tests_and_docs:
runs-on: ubuntu-latest
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os:
# - ubuntu-latest
# - windows-latest
# - macos-latest
env:
GITHUB_DEF_BR: master
steps:
- uses: actions/checkout@v2
- name: 🐍 Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: ⏳ Clone engine and restore oqdata and docker container
run: |
set -x
echo " Check if this is a pull request or not"
if [ -z "$GITHUB_HEAD_REF" ]
then
echo " Is not a pull request, use branch: $GITHUB_DEF_BR"
IRMT_BR=$GITHUB_DEF_BR
else
echo " Is a pull request, use branch: $GITHUB_HEAD_REF"
IRMT_BR=$GITHUB_HEAD_REF
fi
ENGINE_BR=$IRMT_BR
if [ "$(git ls-remote --heads https://github.com/gem/oq-engine.git ${ENGINE_BR})" == "" ]; then
ENGINE_BR='master';
fi
curl -O https://raw.githubusercontent.com/gem/oq-engine/master/install.py
ls -lrt install.py
echo ${ENGINE_BR}
if [ "$(git ls-remote --heads https://github.com/gem/oq-engine.git ${ENGINE_BR})" == "" ]; then
exit 1
fi
python3 install.py user --version=${ENGINE_BR}
export PIP_DEFAULT_TIMEOUT=100
echo "Restore OQ-Engine demos for $ENGINE_BR branch "
source $HOME/openquake/bin/activate
oq reset -y
oq restore https://artifacts.openquake.org/travis/oqdata-${ENGINE_BR}.zip ~/oqdata
oq webui start 172.17.0.1:8800 --skip-browser &> webui.log &
echo "Waiting WEBUI up on port 8800...."
while ! nc -z 172.17.0.1 8800; do
sleep 5
done
curl http://172.17.0.1:8800/v1/engine_version
#
DOCKER_HOST=`ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+'`
ENGINE_HOST=`echo http://$DOCKER_HOST:8800`
docker run -d --name qgis -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`:/tests_directory -e DISPLAY=:99 -e OQ_ENGINE_HOST='http://172.17.0.1:8800' \
-e BRANCH="$IRMT_BR" -e ONLY_CALC_ID="$ONLY_CALC_ID" -e ONLY_OUTPUT_TYPE="$ONLY_OUTPUT_TYPE" -e GEM_QGIS_TEST=y qgis/qgis:final-3_8_3
docker exec qgis bash -c "apt update --allow-releaseinfo-change; DEBIAN_FRONTEND=noninteractive apt install -y python3-scipy python3-matplotlib python3-pyqt5.qtwebkit"
docker exec qgis bash -c "python3 -m pip install pytest"
# OGR_SQLITE_JOURNAL=delete prevents QGIS from using WAL, which modifies geopackages even if they are just read
- name: ℧ Run unit test
run: |
set -x
docker exec -t qgis bash -c "export PYTHONPATH=/usr/share/qgis/python/plugins/:$PYTHONPATH; OGR_SQLITE_JOURNAL=delete pytest -v /tests_directory/svir/test/unit/"
- name: ⨕ Run Integration test
run: |
set -x
echo " Check if this is a pull request or not"
if [ -z "$GITHUB_HEAD_REF" ]
then
echo " Is not a pull request, use branch: $GITHUB_DEF_BR"
IRMT_BR=$GITHUB_DEF_BR
else
echo " Is a pull request, use branch: $GITHUB_HEAD_REF"
IRMT_BR=$GITHUB_HEAD_REF
fi
ENGINE_BR=$IRMT_BR
if [ "$(git ls-remote --heads https://github.com/gem/oq-engine.git ${ENGINE_BR})" == "" ]; then
ENGINE_BR='master';
fi
docker exec qgis sh -c "git clone -q -b $ENGINE_BR --depth=1 https://github.com/gem/oq-engine.git && echo 'Running against oq-engine/$GITHUB_BR'"
docker exec qgis sh -c "qgis_setup.sh svir"
docker exec -t qgis sh -c "cd /tests_directory && qgis_testrunner.sh svir.test.integration.test_drive_oq_engine"
- name: 📖 Make documentation
run: |
set -x
docker exec qgis sh -c "apt update --allow-releaseinfo-change; DEBIAN_FRONTEND=noninteractive apt install -y latexmk texlive-latex-extra python3-matplotlib python3-sphinx python3-sphinx-rtd-theme dvipng"
docker exec -t qgis sh -c "export PYTHONPATH=$PYTHONPATH:/tests_directory; cd /tests_directory/svir/help; make latexpdf; make html"
- name: ㏒ Display web logs
run: |
set -x
cat webui.log