diff --git a/.circleci/config.yml b/.circleci/config.yml index d7440c06..48717dff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,6 +49,22 @@ parameters: type: string default: "arangodb/arangodb-starter:latest" +commands: + run-test-if-pr: + description: "Run a test command only if this is a pull request" + parameters: + test-command: + type: string + steps: + - run: + name: Run integration tests + command: | + if [ -z "$CIRCLE_PULL_REQUEST" ]; then + echo "This is not a pull request. Skipping..." + exit 0 + fi + << parameters.test-command >> + jobs: check-code: @@ -77,7 +93,7 @@ jobs: name: Download itzpapalotl demo foxx service command: | if [ -z "$CIRCLE_PULL_REQUEST" ]; then - echo "This is not a pull request. Skipping..." + echo "This is not a pull request. Skipping download..." exit 0 fi if ! [ -f "$HOME/resources/itzpapalotl-v1.2.0.zip" ]; then @@ -85,9 +101,9 @@ jobs: "https://github.com/arangodb-foxx/demo-itzpapalotl/archive/v1.2.0.zip" fi - persist_to_workspace: - root: /home/circleci/resources + root: /home/circleci paths: - - itzpapalotl-v1.2.0.zip + - resources # ---------------------------------------- @@ -111,9 +127,8 @@ jobs: - run: name: Ensure resources directory exists command: mkdir -p $HOME/resources - - run: - name: Run integration tests - command: make << parameters.test-to-run >> + - run-test-if-pr: + test-command: make << parameters.test-to-run >> environment: <<: *integration_test_env @@ -143,9 +158,8 @@ jobs: command: | echo 'export DOCKER_PLATFORM="--platform linux/arm64"' >> $BASH_ENV echo 'export DOCKER_BUILD_PLATFORM="--platform linux/arm64"' >> $BASH_ENV - - run: - name: Run integration tests - command: make << parameters.test-to-run >> + - run-test-if-pr: + test-command: make << parameters.test-to-run >> environment: <<: *integration_test_env @@ -219,12 +233,12 @@ workflows: - download-demo-data test-to-run: run-v2-tests-cluster - - run-integration-tests-arm: - name: Test V2 cluster - DB extra features (compression) (ARM) - requires: - - download-demo-data - test-to-run: run-v2-tests-cluster - enable-extra-db-features: true + # - run-integration-tests-arm: + # name: Test V2 cluster - DB extra features (compression) (ARM) + # requires: + # - download-demo-data + # test-to-run: run-v2-tests-cluster + # enable-extra-db-features: true - run-integration-tests-arm: name: Test V2 single (ARM)