]> git.mxchange.org Git - friendica.git/commitdiff
Add memcache/memcached tests
authorPhilipp Holzer <admin+github@philipp.info>
Tue, 24 Sep 2019 14:10:48 +0000 (16:10 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Mon, 30 Sep 2019 12:03:14 +0000 (14:03 +0200)
.drone.yml
autotest.sh

index 5a330c03ee95ec8bdd23d6552821398bd04eaedf..53df6dabad94d3006d8c4086fc27ad62283b849f 100644 (file)
@@ -184,3 +184,160 @@ services:
 #  event:
 #    - pull_request
 #    - push
+
+---
+kind: pipeline
+name: memcache-php7.1
+
+steps:
+    - name: memcache-php7.1
+      image: friendicaci/php7.1:php7.1.32
+      commands:
+          - phpenmod xdebug
+          - sleep 20
+          - NOINSTALL=true TEST_SELECTION=MEMCACHE ./autotest.sh
+          - wget https://codecov.io/bash -O codecov.sh
+          - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 2f4b253b-ca17-41d7-96e3-81623581c97d -f tests/autotest-clover.xml; fi"
+          - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 2f4b253b-ca17-41d7-96e3-81623581c97d -f tests/autotest-clover.xml; fi"
+      environment:
+          MEMCACHE_HOST: memcached
+
+services:
+    - name: memcached
+      image: memcached
+
+#trigger:
+#  branch:
+#    - master
+#    - develop
+#    - "*-rc"
+#  event:
+#    - pull_request
+#    - push
+---
+kind: pipeline
+name: memcache-php7.2
+
+steps:
+    - name: memcache-php7.2
+      image: friendicaci/php7.2:php7.2.22
+      commands:
+          - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHE ./autotest.sh
+      environment:
+          MEMCACHE_HOST: memcached
+
+services:
+    - name: memcached
+      image: memcached
+
+#trigger:
+#  branch:
+#    - master
+#    - develop
+#    - "*-rc"
+#  event:
+#    - pull_request
+#    - push
+---
+kind: pipeline
+name: memcache-php7.3
+
+steps:
+    - name: memcache-php7.3
+      image: friendicaci/php7.3:php7.3.9
+      commands:
+          - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHE ./autotest.sh
+      environment:
+          MEMCACHE_HOST: memcached
+
+services:
+    - name: memcached
+      image: memcached
+
+#trigger:
+#  branch:
+#    - master
+#    - develop
+#    - "*-rc"
+#  event:
+#    - pull_request
+#    - push
+
+
+---
+kind: pipeline
+name: memcached-php7.1
+
+steps:
+    - name: memcached-php7.1
+      image: friendicaci/php7.1:php7.1.32
+      commands:
+          - phpenmod xdebug
+          - sleep 20
+          - NOINSTALL=true TEST_SELECTION=MEMCACHED ./autotest.sh
+          - wget https://codecov.io/bash -O codecov.sh
+          - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 2f4b253b-ca17-41d7-96e3-81623581c97d -f tests/autotest-clover.xml; fi"
+          - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 2f4b253b-ca17-41d7-96e3-81623581c97d -f tests/autotest-clover.xml; fi"
+      environment:
+          MEMCACHED_HOST: memcached
+
+services:
+    - name: memcached
+      image: memcached
+
+#trigger:
+#  branch:
+#    - master
+#    - develop
+#    - "*-rc"
+#  event:
+#    - pull_request
+#    - push
+---
+kind: pipeline
+name: memcached-php7.2
+
+steps:
+    - name: memcached-php7.2
+      image: friendicaci/php7.2:php7.2.22
+      commands:
+          - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHED ./autotest.sh
+      environment:
+          MEMCACHED_HOST: memcached
+
+services:
+    - name: memcached
+      image: memcached
+
+#trigger:
+#  branch:
+#    - master
+#    - develop
+#    - "*-rc"
+#  event:
+#    - pull_request
+#    - push
+---
+kind: pipeline
+name: memcached-php7.3
+
+steps:
+    - name: memcached-php7.3
+      image: friendicaci/php7.3:php7.3.9
+      commands:
+          - NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=MEMCACHED ./autotest.sh
+      environment:
+          MEMCACHED_HOST: memcached
+
+services:
+    - name: memcached
+      image: memcached
+
+#trigger:
+#  branch:
+#    - master
+#    - develop
+#    - "*-rc"
+#  event:
+#    - pull_request
+#    - push
index 17f690a5b454b1be858ae11fc6e0756aa75f8ad6..2235c041e11093d50a937009cb4601b5965bb278 100755 (executable)
@@ -131,27 +131,27 @@ function execute_tests {
 
     COVER=''
     if [ -z "$NOCOVERAGE" ]; then
-      COVER="--coverage-clover=tests/autotest-clover.xml --coverage-html=tests/coverage-html"
+      COVER="--coverage-clover tests/autotest-clover.xml --coverage-html tests/coverage-html"
     else
       echo "No coverage"
     fi
 
     # per default, there is no cache installed
-    GROUP='--exclude-group=REDIS,MEMCACHE,MEMCACHED,APCU'
+    GROUP='--exclude-group REDIS,MEMCACHE,MEMCACHED,APCU'
     if [ "$TEST_SELECTION" == "REDIS" ]; then
-      GROUP="--group=REDIS"
+      GROUP="--group REDIS"
     fi
     if [ "$TEST_SELECTION" == "MEMCACHE" ]; then
-      GROUP="--group=MEMCACHE"
+      GROUP="--group MEMCACHE"
     fi
     if [ "$TEST_SELECTION" == "MEMCACHED" ]; then
-      GROUP="--group=MEMCACHED"
+      GROUP="--group MEMCACHED"
     fi
     if [ "$TEST_SELECTION" == "APCU" ]; then
-      GROUP="--group=APCU"
+      GROUP="--group APCU"
     fi
     if [ "$TEST_SELECTION" == "NODB" ]; then
-      GROUP="--exclude-group=DB,SLOWDB"
+      GROUP="--exclude-group DB,SLOWDB"
     fi
 
     INPUT="$BASEDIR/tests"
@@ -159,8 +159,8 @@ function execute_tests {
       INPUT="$INPUT/$1"
     fi
 
-    echo "${PHPUNIT[@]}" --configuration tests/phpunit.xml "$GROUP" "$COVER" --log-junit "autotest-results.xml" "$INPUT" "$2"
-    "${PHPUNIT[@]}" --configuration tests/phpunit.xml "$GROUP" "$COVER" --log-junit "autotest-results.xml" "$INPUT" "$2"
+    echo "${PHPUNIT[@]}" --configuration tests/phpunit.xml $GROUP $COVER --log-junit "autotest-results.xml" "$INPUT" "$2"
+    "${PHPUNIT[@]}" --configuration tests/phpunit.xml $GROUP $COVER --log-junit "autotest-results.xml" "$INPUT" "$2"
     RESULT=$?
 
     if [ -n "$DOCKER_CONTAINER_ID" ]; then