Skip to content

subscribe to wis2box/# on internal broker #2580

subscribe to wis2box/# on internal broker

subscribe to wis2box/# on internal broker #2580

Workflow file for this run

name: test docker deployment ⚙️
on: [ push, pull_request ]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: setup Python
with:
python-version: 3.8
- name: install testing requirements 📦
working-directory: tests
run: |
pip3 install -r requirements.txt
- name: cache schemas 📦
run: |
pywis-pubsub schema sync
- name: display Docker and Python versions 📦
run: |
docker version
docker-compose version
python3 -V
- name: setup wis2box configuration
run: |
cp tests/test.env dev.env
cat dev.env
python3 wis2box-ctl.py config
- name: build wis2box
run: |
python3 wis2box-ctl.py build
python3 wis2box-ctl.py update
- name: start containers ⚙️
run: |
python3 wis2box-ctl.py start
python3 wis2box-ctl.py status -a
docker logs wis2box-management
- name: setup wis2box-management ⚙️
run: |
sleep 30
python3 wis2box-ctl.py execute wis2box environment show
- name: add Malawi data 🇲🇼
env:
TOPIC_HIERARCHY: mwi.mwi_met_centre.data.core.weather.surface-based-observations.synop
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/mwi-surface-weather-observations.yml
TEST_DATA: /data/wis2box/observations/malawi
run: |
python3 wis2box-ctl.py execute wis2box metadata discovery publish $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data add-collection $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data ingest -th $TOPIC_HIERARCHY -p $TEST_DATA
- name: add Italy data 🇮🇹
env:
TOPIC_HIERARCHY: ita.roma_met_centre.data.core.weather.surface-based-observations.synop
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/ita-surface-weather-observations.yml
TEST_DATA: /data/wis2box/observations/italy
run: |
python3 wis2box-ctl.py execute wis2box metadata discovery publish $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data add-collection $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data ingest -th $TOPIC_HIERARCHY -p $TEST_DATA
- name: add Algeria data 🇩🇿
env:
TOPIC_HIERARCHY: dza.alger_met_centre.data.core.weather.surface-based-observations.synop
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/dza-surface-weather-observations.yml
TEST_DATA: /data/wis2box/observations/algeria
run: |
python3 wis2box-ctl.py execute wis2box metadata discovery publish $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data add-collection $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data ingest -th $TOPIC_HIERARCHY -p $TEST_DATA
- name: add Romania data 🇷🇴
env:
TOPIC_HIERARCHY: rou.rnimh.data.core.weather.surface-based-observations.synop
DISCOVERY_METADATA: /data/wis2box/metadata/discovery/rou-synoptic-weather-observations.yml
TEST_DATA: /data/wis2box/observations/romania
run: |
python3 wis2box-ctl.py execute wis2box metadata discovery publish $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data add-collection $DISCOVERY_METADATA
python3 wis2box-ctl.py execute wis2box data ingest -th $TOPIC_HIERARCHY -p $TEST_DATA
- name: sync stations 🔄
run: |
sleep 15
python3 wis2box-ctl.py execute wis2box metadata station publish-collection
- name: run integration tests ⚙️
run: |
sleep 10
pytest -s tests/integration
- name: run flake8 ⚙️
run: |
find . -type f -name "*.py" | xargs flake8
- name: failed tests 🚩
if: ${{ failure() }}
run: |
docker-compose --file docker-compose.yml --file docker-compose.override.yml --file docker-compose.monitoring.yml --env-file dev.env --project-name wis2box_project ps
docker-compose --file docker-compose.yml --file docker-compose.override.yml --file docker-compose.monitoring.yml --env-file dev.env --project-name wis2box_project logs