remove job manager not used #235
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: test-with-wis2box | |
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 dependencies | |
working-directory: docker_compose_test | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
- name: Docker Compose up -d --build | |
working-directory: docker_compose_test | |
run: | |
docker compose up -d --build | |
- name: Wait for service to be ready | |
run: sleep 30 | |
- name: publish stations | |
working-directory: docker_compose_test | |
run: | | |
docker exec -t wis2box-api-test-wis2box-management wis2box metadata station publish-collection | |
- name: publish datasets | |
working-directory: docker_compose_test | |
run: | | |
docker exec -t wis2box-api-test-wis2box-management wis2box dataset publish /data/wis2box/metadata/discovery/synop-test.yml | |
docker exec -t wis2box-api-test-wis2box-management wis2box dataset publish /data/wis2box/metadata/discovery/csv-test.yml | |
docker exec -t wis2box-api-test-wis2box-management wis2box dataset publish /data/wis2box/metadata/discovery/bufr-test.yml | |
- name: associate stations to topics | |
working-directory: docker_compose_test | |
run: | | |
docker exec -t wis2box-api-test-wis2box-management wis2box metadata station add-topic --wsi 0-20000-0-64400 origin/a/wis2/synop-test/data/core/weather/surface-based-observations/synop | |
docker exec -t wis2box-api-test-wis2box-management wis2box metadata station add-topic --wsi 0-20000-0-15015 origin/a/wis2/csv-test/data/core/weather/surface-based-observations/synop | |
docker exec -t wis2box-api-test-wis2box-management wis2box metadata station add-topic --wsi 0-20000-0-16344 origin/a/wis2/bufr-test/data/core/weather/surface-based-observations/synop | |
- name: Check status code API | |
working-directory: docker_compose_test | |
run: | | |
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4343/oapi) | |
if [[ $status_code -ne 200 ]]; then | |
echo "Request failed with status code $status_code" | |
exit 1 | |
fi | |
- name: run integration tests ⚙️ | |
working-directory: docker_compose_test | |
run: | | |
pytest -s tests/integration | |
- name: failed tests 🚩 | |
working-directory: docker_compose_test | |
if: ${{ failure() }} | |
run: | | |
docker compose logs |