From d90c666bc954ea0bf24fadccd6beb33e0ea797f6 Mon Sep 17 00:00:00 2001 From: Krishnan Govindraj Date: Thu, 13 Jun 2024 14:09:32 +0100 Subject: [PATCH] Revert factory & circleci --- .circleci/config.yml | 8 +- .factory/automation.yml | 1134 +++++++++++++++++++-------------------- 2 files changed, 571 insertions(+), 571 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a84b50705d..191f214fcb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -802,7 +802,7 @@ jobs: apt update -y && apt install -y software-properties-common add-apt-repository -y ppa:deadsnakes/ppa apt update -y && apt install -y python3.9 python3.9-distutils python3-pip software-properties-common - python3.10 -m pip install -U cffi + python3.9 -m pip install -U cffi export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${CIRCLE_PROJECT_REPONAME}@$(cat VERSION) @@ -978,9 +978,9 @@ workflows: - sync-dependencies: filters: branches: - only: [release, one-off-sync-dependencies-bazel-run-python-path] -# requires: -# - deploy-github + only: [release] + requires: + - deploy-github - release-cleanup: filters: branches: diff --git a/.factory/automation.yml b/.factory/automation.yml index 2a6419b1f7..9871d75291 100644 --- a/.factory/automation.yml +++ b/.factory/automation.yml @@ -1,567 +1,567 @@ -## Licensed to the Apache Software Foundation (ASF) under one -## or more contributor license agreements. See the NOTICE file -## distributed with this work for additional information -## regarding copyright ownership. The ASF licenses this file -## to you under the Apache License, Version 2.0 (the -## "License"); you may not use this file except in compliance -## with the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, -## software distributed under the License is distributed on an -## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -## KIND, either express or implied. See the License for the -## specific language governing permissions and limitations -## under the License. -# -#config: -# version-candidate: VERSION -# dependencies: -# dependencies: [build] -# typedb-behaviour: [build] -# typedb-protocol: [build, release] -# typeql: [build, release] -# -#build: -# quality: -# filter: -# owner: vaticle -# branch: [master, development] -# dependency-analysis: -# image: vaticle-ubuntu-22.04 -# command: | -# bazel run @vaticle_dependencies//factory/analysis:dependency-analysis -# -# correctness: -# build: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# machine: 16-core-64-gb -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# sudo apt-get update -# sudo apt install python3-pip -y -# python3 -m pip install -U pip -# python3 -m pip install -r python/requirements_dev.txt -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel build //... -# bazel run @vaticle_dependencies//tool/checkstyle:test-coverage -# bazel test $(bazel query 'kind(checkstyle_test, //...)') --test_output=errors -# bazel test $(bazel query 'kind(rustfmt_test, //...)') --@rules_rust//:rustfmt.toml=//rust:rustfmt_config -# cd nodejs -# npm install -# npm run lint -# -# build-dependency: -# image: vaticle-ubuntu-22.04 -# command: | -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# dependencies/maven/update.sh -# git diff --exit-code dependencies/maven/artifacts.snapshot -# bazel run @vaticle_dependencies//tool/unuseddeps:unused-deps -- list -# -# build-docs: -# image: vaticle-ubuntu-22.04 -# command: | -# curl -L https://github.com/doxygen/doxygen/releases/download/Release_1_10_0/doxygen-1.10.0.linux.bin.tar.gz | tar xzO doxygen-1.10.0/bin/doxygen > /var/tmp/doxygen && -# sudo mv /var/tmp/doxygen /usr/local/bin/ && sudo chmod +x /usr/local/bin/doxygen -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# DOCS_DIRS="docs/modules/ROOT/partials/java docs/modules/ROOT/partials/nodejs docs/modules/ROOT/partials/python docs/modules/ROOT/partials/rust docs/modules/ROOT/partials/cpp docs/modules/ROOT/partials/c docs/modules/ROOT/partials/csharp" -# find $DOCS_DIRS -type f ! -name 'api-reference.adoc' -exec rm -f {} \; -# tool/docs/update.sh -# git add $DOCS_DIRS -# git diff --exit-code HEAD $DOCS_DIRS -# -# test-rust-unit-integration: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel test //rust:typedb_driver_unit_tests --test_output=streamed || exit 1 -# tool/test/start-core-server.sh && -# bazel test //rust/tests --test_output=streamed --test_arg=-- \ -# --test_arg=integration::queries::core && -# export CORE_FAILED= || export CORE_FAILED=1 -# tool/test/stop-core-server.sh -# if [[ -n "$CORE_FAILED" ]]; then exit 1; fi -# -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=integration::queries::cloud \ -# --test_arg=integration::runtimes \ -# --test_arg=integration::network && -# export CLOUD_FAILED= || export CLOUD_FAILED=1 -# tool/test/stop-cloud-servers.sh -# if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi -# -# test-rust-behaviour-minimal: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::concept && -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::connection && -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::driver && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-rust-behaviour-query-read: -# machine: 8-core-32-gb -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# filter: -# owner: vaticle -# branch: [master, development] -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::query::language::match_ \ -# --test_arg=behaviour::query::language::get \ -# --test_arg=behaviour::query::language::fetch \ -# --test_arg=behaviour::query::language::modifiers \ -# --test_arg=behaviour::query::language::expression && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-rust-behaviour-query-write: -# machine: 8-core-32-gb -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# filter: -# owner: vaticle -# branch: [master, development] -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::query::language::define \ -# --test_arg=behaviour::query::language::undefine \ -# --test_arg=behaviour::query::language::insert \ -# --test_arg=behaviour::query::language::delete \ -# --test_arg=behaviour::query::language::update \ -# --test_arg=behaviour::query::language::rule_validation && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-c-integration: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# bazel test //c/tests/integration:test-driver --test_output=errors && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-java-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel test //java/test/integration/... --test_output=errors -# -# test-java-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# .factory/test-core.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 -# # TODO: delete --jobs=1 if we fix the issue with excess memory usage -# .factory/test-core.sh //java/test/behaviour/concept/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/driver/query/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/... --test_output=errors --jobs=1 -# -# test-java-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# .factory/test-cloud.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 -# # TODO: delete --jobs=1 if we fix the issue with excess memory usage -# .factory/test-cloud.sh //java/test/behaviour/concept/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/driver/query/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/... --test_output=errors --jobs=1 -# -# test-python-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# -# tool/test/start-core-server.sh && -# .factory/test-core.sh //python/tests/behaviour/connection/database/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/connection/session/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/driver/query/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/... --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-python-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# -# source tool/test/start-cloud-servers.sh && # use source to receive export vars -# .factory/test-cloud.sh //python/tests/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-python-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# -# tool/test/start-core-server.sh && -# bazel test //python/tests/integration:test_stream --test_output=streamed --jobs=1 && -# export CORE_FAILED= || export CORE_FAILED=1 -# tool/test/stop-core-server.sh -# if [[ -n "$CORE_FAILED" ]]; then exit 1; fi -# -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //python/tests/integration:test_connection --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# # TODO #635: currently broken test -# # bazel test //python/tests/integration:test_cloud_failover --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# export CLOUD_FAILED= || export CLOUD_FAILED=1 -# tool/test/stop-cloud-servers.sh -# if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi -# -# test-nodejs-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel build //nodejs/... -# cp -rL bazel-bin/nodejs/node_modules nodejs/. -# cp -rL bazel-bin/nodejs/dist nodejs/. -# tool/test/start-core-server.sh && -# node nodejs/test/integration/test-concept.js && -# node nodejs/test/integration/test-query.js && -# node nodejs/test/integration/test-connection-core.js && -# export CORE_FAILED= || export CORE_FAILED=1 -# tool/test/stop-core-server.sh -# if [[ -n "$CORE_FAILED" ]]; then exit 1; fi -# -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# node nodejs/test/integration/test-connection-cloud.js && -# node nodejs/test/integration/test-cloud-failover.js && -# export CLOUD_FAILED= || export CLOUD_FAILED=1 -# tool/test/stop-cloud-servers.sh -# if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi -# -# test-nodejs-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# .factory/test-core.sh //nodejs/test/behaviour/connection/database/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/connection/session/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/connection/transaction/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/driver/query/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/... --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-nodejs-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh && # use source to receive export vars -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-cpp-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# sudo apt-get update -# sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# bazel test //cpp/test/integration:test-cpp-driver-core --test_output=streamed --jobs=1 && -# export CORE_FAILED= || export CORE_FAILED=1 -# tool/test/stop-core-server.sh -# if [[ -n "$CORE_FAILED" ]]; then exit 1; fi -# -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //cpp/test/integration:test-cpp-driver-cloud --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# export CLOUD_FAILED= || export CLOUD_FAILED=1 -# tool/test/stop-cloud-servers.sh -# if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi -# -# test-cpp-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# sudo apt-get update -# sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# .factory/test-core.sh //cpp/test/behaviour/connection/database/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/connection/session/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/driver/query/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/... --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-cpp-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-csharp-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# sudo apt-get update -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# bazel test //csharp/Test/Integration/Data/... --test_output=streamed --jobs=1 && -# bazel test //csharp/Test/Integration/Marshal/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //csharp/Test/Integration/Examples/... --test_output=streamed --jobs=1 && -# export CORE_FAILED= || export CORE_FAILED=1 -# tool/test/stop-core-server.sh -# if [[ -n "$CORE_FAILED" ]]; then exit 1; fi -# -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //csharp/Test/Integration/Network/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Integration/Examples/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# export CLOUD_FAILED= || export CLOUD_FAILED=1 -# tool/test/stop-cloud-servers.sh -# if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi -# -# test-csharp-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# sudo apt-get update -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# .factory/test-core.sh //csharp/Test/Behaviour/Connection/Database/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //csharp/Test/Behaviour/Connection/Session/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //csharp/Test/Behaviour/Concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //csharp/Test/Behaviour/Driver/Query/... --test_output=errors && -# .factory/test-core.sh //csharp/Test/Behaviour/Query/Language/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //csharp/Test/Behaviour/Query/Reasoner/... --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-csharp-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/User/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Driver/Query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Reasoner/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# sync-dependencies: -# image: vaticle-ubuntu-22.04 -# filter: -# owner: vaticle -# branch: [master, development] -# dependencies: -# - build -# - build-dependency -# - build-docs -# - test-rust-unit-integration -# - test-rust-behaviour-minimal -# - test-rust-behaviour-query-read -# - test-rust-behaviour-query-write -# - test-c-integration -# - test-java-integration -# - test-java-behaviour-core -# - test-java-behaviour-cloud -# - test-python-behaviour-core -# - test-python-behaviour-cloud -# - test-python-integration -# - test-nodejs-integration -# - test-nodejs-behaviour-core -# - test-nodejs-behaviour-cloud -# - test-cpp-integration -# - test-cpp-behaviour-core -# - test-cpp-behaviour-cloud -# - test-csharp-integration -# - test-csharp-behaviour-core -# - test-csharp-behaviour-cloud -# command: | -# sudo add-apt-repository -y ppa:deadsnakes/ppa -# sudo apt update && sudo apt install -y python3.9 python3.9-distutils python3-pip -# python3.9 -m pip install -U cffi -# export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN -# bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@${FACTORY_COMMIT} -# -## TODO #512: assembly tests for all drivers to run in factory -# -#release: -# filter: -# owner: vaticle -# branch: [master] -# validation: -# validate-dependencies: -# image: vaticle-ubuntu-22.04 -# command: | -# bazel test //:release-validate-deps --test_output=streamed -# validate-release-notes: -# image: vaticle-ubuntu-22.04 -# command: | -# export NOTES_VALIDATE_TOKEN=$REPO_GITHUB_TOKEN -# bazel run @vaticle_dependencies//tool/release/notes:validate --test_output=streamed -- $FACTORY_OWNER $FACTORY_REPO RELEASE_NOTES_LATEST.md -# -# deployment: -# trigger-release-circleci: -# image: vaticle-ubuntu-22.04 -# command: | -# git checkout -b release -# git push -f origin release -# echo "Successfully pushed branch 'release', which triggers a release workflow in CircleCI. The progress of the release can be tracked there." +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +config: + version-candidate: VERSION + dependencies: + dependencies: [build] + typedb-behaviour: [build] + typedb-protocol: [build, release] + typeql: [build, release] + +build: + quality: + filter: + owner: vaticle + branch: [master, development] + dependency-analysis: + image: vaticle-ubuntu-22.04 + command: | + bazel run @vaticle_dependencies//factory/analysis:dependency-analysis + + correctness: + build: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + machine: 16-core-64-gb + command: | + export PATH="$HOME/.local/bin:$PATH" + sudo apt-get update + sudo apt install python3-pip -y + python3 -m pip install -U pip + python3 -m pip install -r python/requirements_dev.txt + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel build //... + bazel run @vaticle_dependencies//tool/checkstyle:test-coverage + bazel test $(bazel query 'kind(checkstyle_test, //...)') --test_output=errors + bazel test $(bazel query 'kind(rustfmt_test, //...)') --@rules_rust//:rustfmt.toml=//rust:rustfmt_config + cd nodejs + npm install + npm run lint + + build-dependency: + image: vaticle-ubuntu-22.04 + command: | + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + dependencies/maven/update.sh + git diff --exit-code dependencies/maven/artifacts.snapshot + bazel run @vaticle_dependencies//tool/unuseddeps:unused-deps -- list + + build-docs: + image: vaticle-ubuntu-22.04 + command: | + curl -L https://github.com/doxygen/doxygen/releases/download/Release_1_10_0/doxygen-1.10.0.linux.bin.tar.gz | tar xzO doxygen-1.10.0/bin/doxygen > /var/tmp/doxygen && + sudo mv /var/tmp/doxygen /usr/local/bin/ && sudo chmod +x /usr/local/bin/doxygen + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + DOCS_DIRS="docs/modules/ROOT/partials/java docs/modules/ROOT/partials/nodejs docs/modules/ROOT/partials/python docs/modules/ROOT/partials/rust docs/modules/ROOT/partials/cpp docs/modules/ROOT/partials/c docs/modules/ROOT/partials/csharp" + find $DOCS_DIRS -type f ! -name 'api-reference.adoc' -exec rm -f {} \; + tool/docs/update.sh + git add $DOCS_DIRS + git diff --exit-code HEAD $DOCS_DIRS + + test-rust-unit-integration: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel test //rust:typedb_driver_unit_tests --test_output=streamed || exit 1 + tool/test/start-core-server.sh && + bazel test //rust/tests --test_output=streamed --test_arg=-- \ + --test_arg=integration::queries::core && + export CORE_FAILED= || export CORE_FAILED=1 + tool/test/stop-core-server.sh + if [[ -n "$CORE_FAILED" ]]; then exit 1; fi + + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=integration::queries::cloud \ + --test_arg=integration::runtimes \ + --test_arg=integration::network && + export CLOUD_FAILED= || export CLOUD_FAILED=1 + tool/test/stop-cloud-servers.sh + if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi + + test-rust-behaviour-minimal: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::concept && + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::connection && + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::driver && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-rust-behaviour-query-read: + machine: 8-core-32-gb + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + filter: + owner: vaticle + branch: [master, development] + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::query::language::match_ \ + --test_arg=behaviour::query::language::get \ + --test_arg=behaviour::query::language::fetch \ + --test_arg=behaviour::query::language::modifiers \ + --test_arg=behaviour::query::language::expression && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-rust-behaviour-query-write: + machine: 8-core-32-gb + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + filter: + owner: vaticle + branch: [master, development] + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::query::language::define \ + --test_arg=behaviour::query::language::undefine \ + --test_arg=behaviour::query::language::insert \ + --test_arg=behaviour::query::language::delete \ + --test_arg=behaviour::query::language::update \ + --test_arg=behaviour::query::language::rule_validation && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-c-integration: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + bazel test //c/tests/integration:test-driver --test_output=errors && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-java-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel test //java/test/integration/... --test_output=errors + + test-java-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + .factory/test-core.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 + # TODO: delete --jobs=1 if we fix the issue with excess memory usage + .factory/test-core.sh //java/test/behaviour/concept/... --test_output=errors + .factory/test-core.sh //java/test/behaviour/driver/query/... --test_output=errors + .factory/test-core.sh //java/test/behaviour/query/language/... --test_output=errors --jobs=1 + + test-java-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + .factory/test-cloud.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 + # TODO: delete --jobs=1 if we fix the issue with excess memory usage + .factory/test-cloud.sh //java/test/behaviour/concept/... --test_output=errors + .factory/test-cloud.sh //java/test/behaviour/driver/query/... --test_output=errors + .factory/test-cloud.sh //java/test/behaviour/query/language/... --test_output=errors --jobs=1 + + test-python-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + + tool/test/start-core-server.sh && + .factory/test-core.sh //python/tests/behaviour/connection/database/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/connection/session/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/driver/query/... --test_output=errors && + .factory/test-core.sh //python/tests/behaviour/query/language/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-python-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + + source tool/test/start-cloud-servers.sh && # use source to receive export vars + .factory/test-cloud.sh //python/tests/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && + .factory/test-cloud.sh //python/tests/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-python-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + + tool/test/start-core-server.sh && + bazel test //python/tests/integration:test_stream --test_output=streamed --jobs=1 && + export CORE_FAILED= || export CORE_FAILED=1 + tool/test/stop-core-server.sh + if [[ -n "$CORE_FAILED" ]]; then exit 1; fi + + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //python/tests/integration:test_connection --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + # TODO #635: currently broken test + # bazel test //python/tests/integration:test_cloud_failover --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + export CLOUD_FAILED= || export CLOUD_FAILED=1 + tool/test/stop-cloud-servers.sh + if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi + + test-nodejs-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel build //nodejs/... + cp -rL bazel-bin/nodejs/node_modules nodejs/. + cp -rL bazel-bin/nodejs/dist nodejs/. + tool/test/start-core-server.sh && + node nodejs/test/integration/test-concept.js && + node nodejs/test/integration/test-query.js && + node nodejs/test/integration/test-connection-core.js && + export CORE_FAILED= || export CORE_FAILED=1 + tool/test/stop-core-server.sh + if [[ -n "$CORE_FAILED" ]]; then exit 1; fi + + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + node nodejs/test/integration/test-connection-cloud.js && + node nodejs/test/integration/test-cloud-failover.js && + export CLOUD_FAILED= || export CLOUD_FAILED=1 + tool/test/stop-cloud-servers.sh + if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi + + test-nodejs-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + .factory/test-core.sh //nodejs/test/behaviour/connection/database/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/connection/session/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/connection/transaction/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/driver/query/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/query/language/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-nodejs-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh && # use source to receive export vars + .factory/test-cloud.sh //nodejs/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-cpp-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + sudo apt-get update + sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + bazel test //cpp/test/integration:test-cpp-driver-core --test_output=streamed --jobs=1 && + export CORE_FAILED= || export CORE_FAILED=1 + tool/test/stop-core-server.sh + if [[ -n "$CORE_FAILED" ]]; then exit 1; fi + + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //cpp/test/integration:test-cpp-driver-cloud --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + export CLOUD_FAILED= || export CLOUD_FAILED=1 + tool/test/stop-cloud-servers.sh + if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi + + test-cpp-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + sudo apt-get update + sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + .factory/test-core.sh //cpp/test/behaviour/connection/database/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/connection/session/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/driver/query/... --test_output=errors && + .factory/test-core.sh //cpp/test/behaviour/query/language/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-cpp-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh && + .factory/test-cloud.sh //cpp/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && + .factory/test-cloud.sh //cpp/test/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-csharp-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + sudo apt-get update + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + bazel test //csharp/Test/Integration/Data/... --test_output=streamed --jobs=1 && + bazel test //csharp/Test/Integration/Marshal/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //csharp/Test/Integration/Examples/... --test_output=streamed --jobs=1 && + export CORE_FAILED= || export CORE_FAILED=1 + tool/test/stop-core-server.sh + if [[ -n "$CORE_FAILED" ]]; then exit 1; fi + + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //csharp/Test/Integration/Network/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Integration/Examples/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + export CLOUD_FAILED= || export CLOUD_FAILED=1 + tool/test/stop-cloud-servers.sh + if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi + + test-csharp-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + sudo apt-get update + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + .factory/test-core.sh //csharp/Test/Behaviour/Connection/Database/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Connection/Session/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Driver/Query/... --test_output=errors && + .factory/test-core.sh //csharp/Test/Behaviour/Query/Language/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Query/Reasoner/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-csharp-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/User/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Driver/Query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && + .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Reasoner/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + sync-dependencies: + image: vaticle-ubuntu-22.04 + filter: + owner: vaticle + branch: [master, development] + dependencies: + - build + - build-dependency + - build-docs + - test-rust-unit-integration + - test-rust-behaviour-minimal + - test-rust-behaviour-query-read + - test-rust-behaviour-query-write + - test-c-integration + - test-java-integration + - test-java-behaviour-core + - test-java-behaviour-cloud + - test-python-behaviour-core + - test-python-behaviour-cloud + - test-python-integration + - test-nodejs-integration + - test-nodejs-behaviour-core + - test-nodejs-behaviour-cloud + - test-cpp-integration + - test-cpp-behaviour-core + - test-cpp-behaviour-cloud + - test-csharp-integration + - test-csharp-behaviour-core + - test-csharp-behaviour-cloud + command: | + sudo add-apt-repository -y ppa:deadsnakes/ppa + sudo apt update && sudo apt install -y python3.9 python3.9-distutils python3-pip + python3.9 -m pip install -U cffi + export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN + bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@${FACTORY_COMMIT} + +# TODO #512: assembly tests for all drivers to run in factory + +release: + filter: + owner: vaticle + branch: [master] + validation: + validate-dependencies: + image: vaticle-ubuntu-22.04 + command: | + bazel test //:release-validate-deps --test_output=streamed + validate-release-notes: + image: vaticle-ubuntu-22.04 + command: | + export NOTES_VALIDATE_TOKEN=$REPO_GITHUB_TOKEN + bazel run @vaticle_dependencies//tool/release/notes:validate --test_output=streamed -- $FACTORY_OWNER $FACTORY_REPO RELEASE_NOTES_LATEST.md + + deployment: + trigger-release-circleci: + image: vaticle-ubuntu-22.04 + command: | + git checkout -b release + git push -f origin release + echo "Successfully pushed branch 'release', which triggers a release workflow in CircleCI. The progress of the release can be tracked there."