Skip to content

Commit

Permalink
Add support of a flaky test monitor (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steap2448 authored Sep 16, 2020
1 parent 5e35dcb commit 2f959ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ docker-build-ce-2.6:
after_script:
# avoid caching cartridge rock
- tarantoolctl rocks remove cartridge
- ./push_test_results.sh
cache:
key: ${IMAGE_NAME}-fake-ui
paths:
Expand All @@ -122,15 +123,15 @@ integration-ee-1.10:
IMAGE_NAME: *IMAGE_NAME_EE_1_10
script:
- pytest -v
- luatest -v -x cypress.*
- luatest -v -x cypress.* | tee luatest.log

.integration-ce:
extends: .test-template
script:
- yum -y upgrade tarantool
- tarantool --version
- pytest -v
- luatest -v -x cypress.*
- luatest -v -x cypress.* | tee luatest.log
rules:
- if: '$NIGHTLY_TEST == "true"'
when: always
Expand Down
13 changes: 13 additions & 0 deletions push_test_results.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "Sending list of test results to ${MONITOR_HOST}..."
curl -s --data-binary "@luatest.log" --cookie "token=${MONITOR_TOKEN}" \
"${MONITOR_HOST}/api_result/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/${CI_COMMIT_SHA}/${CI_JOB_ID}/luatest"

if [ "${CI_COMMIT_REF_NAME}" = "master" ]; then
echo "Sending list of updated tests..."
LAST_COMMIT=$(curl --cookie "token=${MONITOR_TOKEN}" "${MONITOR_HOST}/api_last/${CI_PROJECT_NAME}")
DIFF=$(git diff --name-only "${LAST_COMMIT}")
curl -s -d "${DIFF}" --cookie "token=${MONITOR_TOKEN}" \
"${MONITOR_HOST}/api_diff/${CI_PROJECT_NAME}/${CI_COMMIT_SHA}"
fi

0 comments on commit 2f959ce

Please sign in to comment.