From 75fd3f1e939a2ddb5be7342301d62d6f8000831f Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 08:56:20 +0100 Subject: [PATCH 1/7] fix typos --- .codecov.yml | 5 +---- .github/workflows/ci-testing-deploy.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 8072681d00f..5aee854a999 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -31,7 +31,7 @@ component_management: - packages/aws-library/** - component_id: pkg_dask_task_models_library paths: - - packages/dask-task-library/** + - packages/dask-task-models-library/** - component_id: pkg_models_library paths: - packages/models-library/** @@ -92,9 +92,6 @@ component_management: - component_id: invitations paths: - services/invitations/** - - component_id: migration - paths: - - services/migration/** - component_id: osparc_gateway_server paths: - services/osparc-gateway-server/** diff --git a/.github/workflows/ci-testing-deploy.yml b/.github/workflows/ci-testing-deploy.yml index 31f12fc1acb..3fc98ae7f0c 100644 --- a/.github/workflows/ci-testing-deploy.yml +++ b/.github/workflows/ci-testing-deploy.yml @@ -588,6 +588,16 @@ jobs: run: ./ci/github/unit-testing/api.bash install - name: test run: ./ci/github/unit-testing/api.bash test + - uses: codecov/codecov-action@v4.6.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + flags: unittests #optional + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} unit-test-api-server: needs: changes From 5f27378ec35ee9b78e04926e2f118436ca20fbc0 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:01:14 +0100 Subject: [PATCH 2/7] add test-ci call --- api/tests/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/api/tests/Makefile b/api/tests/Makefile index f732b2fae17..01b0c981585 100644 --- a/api/tests/Makefile +++ b/api/tests/Makefile @@ -26,6 +26,25 @@ test-dev: _check_venv_active ## runs all tests [DEV] # running unit tests pytest -vv --exitfirst --failed-first --durations=10 --pdb $(CURDIR) +.PHONY: test-ci +test-ci: _check_venv_active ## runs all tests [DEV] + # running unit tests + pytest \ + --asyncio-mode=auto \ + --color=yes \ + --cov-append \ + --cov-config=.coveragerc \ + --cov-report=term-missing \ + --cov-report=xml \ + --junitxml=junit.xml -o junit_family=legacy \ + --cov=api \ + --durations=10 \ + --log-date-format="%Y-%m-%d %H:%M:%S" \ + --log-format="%(asctime)s %(levelname)s %(message)s" \ + --verbose \ + -m "not heavy_load" \ + $(PYTEST_ADDITIONAL_PARAMETERS) \ + $(TEST_TARGET) .PHONY: help From a085b5dadcf5aefd93181f57d6f43124826aadd0 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:01:35 +0100 Subject: [PATCH 3/7] change call to test in the CI --- ci/github/unit-testing/api.bash | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ci/github/unit-testing/api.bash b/ci/github/unit-testing/api.bash index e5806f24ff6..627274da553 100755 --- a/ci/github/unit-testing/api.bash +++ b/ci/github/unit-testing/api.bash @@ -6,20 +6,21 @@ set -o pipefail # don't hide errors within pipes IFS=$'\n\t' install() { - bash ci/helpers/ensure_python_pip.bash - pip3 install --requirement api/tests/requirements.txt + make devenv + # shellcheck source=/dev/null + source .venv/bin/activate + pushd api/tests + make install + popd uv pip list } test() { - pytest \ - --color=yes \ - --durations=10 \ - --log-date-format="%Y-%m-%d %H:%M:%S" \ - --log-format="%(asctime)s %(levelname)s %(message)s" \ - --verbose \ - -m "not heavy_load" \ - api/tests + # shellcheck source=/dev/null + source .venv/bin/activate + pushd api/tests + mate test-ci + popd } # Check if the function exists (bash specific) From 1616b5fc3dbfdc0b276b02951d9c4a8c5885a3c7 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:08:58 +0100 Subject: [PATCH 4/7] set a 1% threshold --- .codecov.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.codecov.yml b/.codecov.yml index 5aee854a999..6e9caac4b87 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -13,6 +13,7 @@ flag_management: threshold: 1% - type: patch target: auto + threshold: 1% component_management: @@ -116,10 +117,12 @@ coverage: project: default: informational: true + threshold: 1% patch: default: informational: true + threshold: 1% comment: layout: "header,diff,flags,components,footer" From 60ad3fad55379b82b70c4a4063393d7c2006230d Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:14:14 +0100 Subject: [PATCH 5/7] use recommended way of running always --- .github/workflows/ci-testing-deploy.yml | 118 ++++++++++++------------ 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci-testing-deploy.yml b/.github/workflows/ci-testing-deploy.yml index 3fc98ae7f0c..4d4aa42c13b 100644 --- a/.github/workflows/ci-testing-deploy.yml +++ b/.github/workflows/ci-testing-deploy.yml @@ -345,10 +345,10 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/webserver.bash typecheck - name: test isolated - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/webserver.bash test_isolated - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/webserver.bash test_with_db 01 - uses: codecov/codecov-action@v4.6.0 env: @@ -489,7 +489,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/storage.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/storage.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -540,7 +540,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/agent.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/agent.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -635,10 +635,10 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/api-server.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/api-server.bash test - name: OAS backwards compatibility check - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/api-server.bash openapi-diff - uses: codecov/codecov-action@v4.6.0 env: @@ -687,7 +687,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/autoscaling.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/autoscaling.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -736,10 +736,10 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/catalog.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/catalog.bash test - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs @@ -799,7 +799,7 @@ jobs: pushd services/clusters-keeper && \ make mypy - name: test - if: always() + if: ${{ !cancelled() }} run: | source .venv/bin/activate && \ pushd services/clusters-keeper && \ @@ -851,10 +851,10 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/datcore-adapter.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/datcore-adapter.bash test - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs @@ -948,10 +948,10 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/director-v2.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/director-v2.bash test - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs @@ -1003,7 +1003,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/aws-library.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/aws-library.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1052,7 +1052,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/dask-task-models-library.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/dask-task-models-library.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1101,7 +1101,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/dask-sidecar.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/dask-sidecar.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1157,7 +1157,7 @@ jobs: pushd services/osparc-gateway-server && \ make mypy - name: test - if: always() + if: ${{ !cancelled() }} run: | source .venv/bin/activate && \ pushd services/osparc-gateway-server && \ @@ -1209,7 +1209,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/payments.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/payments.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1258,7 +1258,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/dynamic-scheduler.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/dynamic-scheduler.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1314,7 +1314,7 @@ jobs: pushd services/resource-usage-tracker && \ make mypy - name: test - if: always() + if: ${{ !cancelled() }} run: | source .venv/bin/activate && \ pushd services/resource-usage-tracker && \ @@ -1366,7 +1366,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/dynamic-sidecar.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/dynamic-sidecar.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1423,7 +1423,7 @@ jobs: pushd services/efs-guardian && \ make mypy - name: test - if: always() + if: ${{ !cancelled() }} run: | source .venv/bin/activate && \ pushd services/efs-guardian && \ @@ -1547,7 +1547,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/postgres-database.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/postgres-database.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1596,7 +1596,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/invitations.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/invitations.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1645,7 +1645,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/service-integration.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/service-integration.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1694,7 +1694,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/service-library.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/service-library.bash test_all - uses: codecov/codecov-action@v4.6.0 env: @@ -1743,7 +1743,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/settings-library.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/settings-library.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1844,7 +1844,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/notifications-library.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/notifications-library.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -1895,7 +1895,7 @@ jobs: - name: typecheck run: ./ci/github/unit-testing/simcore-sdk.bash typecheck - name: test - if: always() + if: ${{ !cancelled() }} run: ./ci/github/unit-testing/simcore-sdk.bash test - uses: codecov/codecov-action@v4.6.0 env: @@ -2005,13 +2005,13 @@ jobs: - name: test run: ./ci/github/integration-testing/webserver.bash test 01 - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./services/web/server/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/integration-testing/webserver.bash clean_up - uses: codecov/codecov-action@v4.6.0 env: @@ -2069,13 +2069,13 @@ jobs: - name: test run: ./ci/github/integration-testing/webserver.bash test 02 - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./services/web/server/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/integration-testing/webserver.bash clean_up - uses: codecov/codecov-action@v4.6.0 env: @@ -2133,13 +2133,13 @@ jobs: - name: test run: ./ci/github/integration-testing/director-v2.bash test 01 - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./services/director-v2/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/integration-testing/director-v2.bash clean_up - uses: codecov/codecov-action@v4.6.0 env: @@ -2201,13 +2201,13 @@ jobs: - name: test run: ./ci/github/integration-testing/director-v2.bash test 02 - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./services/director-v2/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/integration-testing/director-v2.bash clean_up - uses: codecov/codecov-action@v4.6.0 env: @@ -2267,13 +2267,13 @@ jobs: - name: test run: ./ci/github/integration-testing/dynamic-sidecar.bash test 01 - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./services/dynamic-sidecar/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/integration-testing/dynamic-sidecar.bash clean_up - uses: codecov/codecov-action@v4.6.0 env: @@ -2344,13 +2344,13 @@ jobs: pushd services/osparc-gateway-server && \ make test-system - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./services/director-v2/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: | pushd services/osparc-gateway-server && \ make down @@ -2410,13 +2410,13 @@ jobs: - name: test run: ./ci/github/integration-testing/simcore-sdk.bash test - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./packages/simcore-sdk/test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/integration-testing/simcore-sdk.bash clean_up - uses: codecov/codecov-action@v4.6.0 env: @@ -2426,7 +2426,7 @@ jobs: integration-tests: # NOTE: this is a github required status check! - if: always() + if: ${{ !cancelled() }} needs: [ integration-test-director-v2-01, @@ -2500,13 +2500,13 @@ jobs: - name: test run: ./ci/github/system-testing/public-api.bash test - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/system-testing/public-api.bash clean_up system-test-swarm-deploy: @@ -2566,13 +2566,13 @@ jobs: name: ${{ github.job }}_services_settings_schemas path: ./services/**/settings-schema.json - name: upload failed tests logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./test_failures - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/system-testing/swarm-deploy.bash clean_up system-test-e2e: @@ -2632,28 +2632,28 @@ jobs: run: ./ci/github/system-testing/e2e.bash test - name: dump docker logs id: docker_logs_dump - if: failure() + if: ${{ !cancelled() }} run: ./ci/github/system-testing/e2e.bash dump_docker_logs - name: upload docker logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./tests/e2e/test_failures - name: upload screenshots - if: always() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_screenshots path: tests/e2e/screenshots - name: upload e2e logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_logs path: tests/e2e/logs - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/system-testing/e2e.bash clean_up system-test-e2e-playwright: @@ -2709,16 +2709,16 @@ jobs: ./ci/github/system-testing/e2e-playwright.bash test - name: dump docker logs id: docker_logs_dump - if: failure() + if: ${{ !cancelled() }} run: ./ci/github/system-testing/e2e-playwright.bash dump_docker_logs - name: upload docker logs - if: failure() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_docker_logs path: ./tests/e2e-playwright/test_failures - name: upload tracing if failed - if: always() + if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 with: name: ${{ github.job }}_tracing @@ -2758,12 +2758,12 @@ jobs: - name: test run: ./ci/github/system-testing/environment-setup.bash test - name: cleanup - if: always() + if: ${{ !cancelled() }} run: ./ci/github/system-testing/environment-setup.bash clean_up system-tests: # NOTE: this is a github required status check! - if: always() + if: ${{ !cancelled() }} needs: [ system-test-e2e, From 08685bc6e48967dc0774edf00f30190406810610 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:28:40 +0100 Subject: [PATCH 6/7] typo --- ci/github/unit-testing/api.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/github/unit-testing/api.bash b/ci/github/unit-testing/api.bash index 627274da553..eb0db9e62fb 100755 --- a/ci/github/unit-testing/api.bash +++ b/ci/github/unit-testing/api.bash @@ -19,7 +19,7 @@ test() { # shellcheck source=/dev/null source .venv/bin/activate pushd api/tests - mate test-ci + make test-ci popd } From 497e73fff1792007f2391fb2952aa57cbfaec256 Mon Sep 17 00:00:00 2001 From: sanderegg <35365065+sanderegg@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:38:59 +0100 Subject: [PATCH 7/7] deleting unused stuff --- .github/workflows/ci-testing-deploy.yml | 37 ------------- ci/github/unit-testing/frontend.bash | 74 ------------------------- 2 files changed, 111 deletions(-) delete mode 100755 ci/github/unit-testing/frontend.bash diff --git a/.github/workflows/ci-testing-deploy.yml b/.github/workflows/ci-testing-deploy.yml index 4d4aa42c13b..86633d0b3c8 100644 --- a/.github/workflows/ci-testing-deploy.yml +++ b/.github/workflows/ci-testing-deploy.yml @@ -1439,42 +1439,6 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} - unit-test-frontend: - needs: changes - if: ${{ needs.changes.outputs.static-webserver == 'true' || github.event_name == 'push' }} - timeout-minutes: 18 # if this timeout gets too small, then split the tests - name: "[unit] frontend" - runs-on: ${{ matrix.os }} - strategy: - matrix: - node: [14] - os: [ubuntu-22.04] - fail-fast: false - steps: - - uses: actions/checkout@v4 - - name: setup docker buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver: docker-container - - uses: actions/setup-node@v4.0.4 - with: - node-version: ${{ matrix.node }} - cache: "npm" - - name: install uv - uses: yezz123/setup-uv@v4 - - uses: actions/cache@v4 - id: cache-uv - with: - path: ~/.cache/uv - key: ${{ runner.os }}-${{ github.job }}-python-${{ matrix.python }}-uv - - name: show system version - run: ./ci/helpers/show_system_versions.bash - - name: install - run: ./ci/github/unit-testing/frontend.bash install - - name: test - run: ./ci/github/unit-testing/frontend.bash test - unit-test-python-linting: needs: changes if: ${{ needs.changes.outputs.anything-py == 'true' || github.event_name == 'push' }} @@ -1927,7 +1891,6 @@ jobs: unit-test-director, unit-test-dynamic-sidecar, unit-test-efs-guardian, - unit-test-frontend, unit-test-models-library, unit-test-notifications-library, unit-test-osparc-gateway-server, diff --git a/ci/github/unit-testing/frontend.bash b/ci/github/unit-testing/frontend.bash deleted file mode 100755 index cffd77cf64a..00000000000 --- a/ci/github/unit-testing/frontend.bash +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# http://redsymbol.net/articles/unofficial-bash-strict-mode/ -set -o errexit # abort on nonzero exitstatus -set -o nounset # abort on unbound variable -set -o pipefail # don't hide errors within pipes -IFS=$'\n\t' - -install() { - npm install - make -C services/static-webserver/client clean - npx eslint --version - make -C services/static-webserver/client info -} - -test() { - echo "# Running Linter" - npm run linter - - pushd services/static-webserver/client - - echo "# Building build version" - make compile - - echo "# Building source version" - make compile-dev flags=--machine-readable - - echo "# Serving source version" - make serve-dev flags="--machine-readable --target=source --listen-port=8080" detached=test-server - - #TODO: move this inside qx-kit container - echo "# Waiting for build to complete" - while ! nc -z localhost 8080; do - sleep 1 # wait for 10 second before check again - done - - # FIXME: reports ERROR ReferenceError: URL is not defined. See https://github.com/ITISFoundation/osparc-simcore/issues/1071 - ## node source-output/resource/qxl/testtapper/run.js --diag --verbose http://localhost:8080/testtapper - wget --spider http://localhost:8080/ - - make clean - popd - - #TODO: no idea what is this doing... disabled at the moment since travis is supposed to do it as well - - # # prepare documentation site ... - # git clone --depth 1 https://github.com/ITISFoundation/itisfoundation.github.io.git - # rm -rf itisfoundation.github.io/.git - - # # if we have old cruft hanging around, we should remove all this will - # # only trigger once - # if [ -d itisfoundation.github.io/transpiled ]; then - # rm -rf itisfoundation.github.io/* - # fi - - # # add the default homepage - # cp -rp docs/webdocroot/* itisfoundation.github.io - - # # add our build - # if [ -d services/static-webserver/client/build-output ]; then - # rm -rf itisfoundation.github.io/frontend - # cp -rp services/static-webserver/client/build-output itisfoundation.github.io/frontend - # fi -} - -# Check if the function exists (bash specific) -if declare -f "$1" > /dev/null -then - # call arguments verbatim - "$@" -else - # Show a helpful error - echo "'$1' is not a known function name" >&2 - exit 1 -fi