From 0edbabc16e4c9806f73d0d8696793c7847f5cbde Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Wed, 13 Dec 2023 10:06:19 -0500 Subject: [PATCH] bring back `test` job --- .circleci/config.yml | 132 +++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b93d1839..6369350a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,14 +8,14 @@ workflows: jobs: - temp # - lint - # - test: - # matrix: - # parameters: - # # TODO: Revisit why pyenv doesn't recognize 3.12 - # python_version: ["3.10"] # ["3.8", "3.9", "3.10", "3.11"] # "3.12" - # arangodb_config: ["single"] # ["single", "cluster"] - # arangodb_license: ["community"] #["community", "enterprise"] - # arangodb_version: ["latest"] #["3.10.10", "3.11.4", "latest"] + - test: + matrix: + parameters: + # TODO: Revisit why pyenv doesn't recognize 3.12 + python_version: ["3.10"] # ["3.8", "3.9", "3.10", "3.11"] # "3.12" + arangodb_config: ["single"] # ["single", "cluster"] + arangodb_license: ["community"] #["community", "enterprise"] + arangodb_version: ["latest"] #["3.10.10", "3.11.4", "latest"] jobs: temp: @@ -34,6 +34,8 @@ jobs: - run: docker ps -a + - run: sleep 10 + - run: docker logs adb @@ -62,75 +64,73 @@ jobs: # name: Run mypy # command: mypy ./arango - # test: - # parameters: - # python_version: - # type: string - # arangodb_config: - # type: string - # arangodb_license: - # type: string - # arangodb_version: - # type: string - # # TODO: Reconsider using a docker image instead of a machine - # # i.e cimg/python:<< parameters.python_version >> - # docker: - # - image: cimg/python:<< parameters.python_version >> - # # machine: - # # image: ubuntu-2204:current - # steps: - # - checkout + test: + parameters: + python_version: + type: string + arangodb_config: + type: string + arangodb_license: + type: string + arangodb_version: + type: string + docker: + - image: cimg/python:<< parameters.python_version >> + # machine: + # image: ubuntu-2204:current + steps: + - checkout - # - setup_remote_docker: - # docker_layer_caching: true + - setup_remote_docker: + docker_layer_caching: true - # - run: - # name: Set Up ArangoDB - # command: | - # chmod +x starter.sh - # ./starter.sh << parameters.arangodb_config >> << parameters.arangodb_license >> << parameters.arangodb_version >> - - # - restore_cache: - # key: pip-and-local-cache - - # # TODO: Revisit this bottleneck - # # - run: - # # name: Setup Python - # # command: | - # # pyenv --version - # # pyenv install -f << parameters.python_version >> - # # pyenv global << parameters.python_version >> + - run: + name: Set Up ArangoDB + command: | + chmod +x starter.sh + ./starter.sh << parameters.arangodb_config >> << parameters.arangodb_license >> << parameters.arangodb_version >> - # - run: - # name: "Install Dependencies" - # command: pip install -e .[dev] + # - restore_cache: + # key: pip-and-local-cache - # - run: docker ps -a + # TODO: Revisit this bottleneck + # - run: + # name: Setup Python + # command: | + # pyenv --version + # pyenv install -f << parameters.python_version >> + # pyenv global << parameters.python_version >> - # - run: docker logs arango + # - run: + # name: "Install Dependencies" + # command: pip install -e .[dev] - # - run: - # name: "Run pytest" - # command: | - # mkdir test-results + - run: docker ps -a - # args=("--junitxml=test-results/junit.xml" "--log-cli-level=DEBUG" "--host" "localhost" "--port=8529") - # if [ << parameters.arangodb_config >> = "cluster" ]; then - # args+=("--cluster" "--port=8539" "--port=8549") - # fi + - run: docker logs arango - # if [ << parameters.arangodb_license >> = "enterprise" ]; then - # args+=("--enterprise") - # fi + # - run: + # name: "Run pytest" + # command: | + # mkdir test-results + + # args=("--junitxml=test-results/junit.xml" "--log-cli-level=DEBUG" "--host" "localhost" "--port=8529") + # if [ << parameters.arangodb_config >> = "cluster" ]; then + # args+=("--cluster" "--port=8539" "--port=8549") + # fi + + # if [ << parameters.arangodb_license >> = "enterprise" ]; then + # args+=("--enterprise") + # fi - # echo "Running pytest with args: ${args[@]}" - # pytest --cov=arango --cov-report=xml "${args[@]}" + # echo "Running pytest with args: ${args[@]}" + # pytest --cov=arango --cov-report=xml "${args[@]}" - # - store_artifacts: - # path: test-results + # - store_artifacts: + # path: test-results - # - store_test_results: - # path: test-results + # - store_test_results: + # path: test-results # - run: # name: Upload to Coveralls