summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-29 08:58:13 +0300
committerAndrew Dolgov <[email protected]>2023-10-29 09:14:18 +0300
commit8b72d9ab1143416ca28ff3ab1230eb575ee63ace (patch)
treebeab0d5c88b9cf29ff91c8bb3f413ca8912270bc /.gitlab-ci.yml
parent855695a8620a3a5ffada836fd28e04bb912bbd3a (diff)
add phpunit integration (wip)
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml18
1 files changed, 15 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 900dcae7b..ce7be8695 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -61,7 +61,7 @@ phpdoc:
chmod 0600 ~/.ssh/id_ed25519
- rsync -av -e 'ssh -o StrictHostKeyChecking=no' phpdoc/ ${PHPDOC_DEPLOY_HOST}:phpdoc/
-integration-test:
+selenium:
image: ${SELENIUM_IMAGE}
variables:
TEST_HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss
@@ -73,8 +73,20 @@ integration-test:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-integration-test:branch:
- extends: integration-test
+selenium:branch:
+ extends: selenium
+ rules:
+ - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_REGISTRY_USER != null
+ when: manual
+
+phpunit-integration:branch:
+ image: ${PHP_IMAGE}
+ extends: selenium
+ script:
+ - export K8S_NAMESPACE=$(kubectl get pods -o=custom-columns=NS:.metadata.namespace | tail -1)
+ - export API_URL="http://tt-rss-${CI_COMMIT_SHORT_SHA}-app.$K8S_NAMESPACE.svc.cluster.local/tt-rss/api/"
+ - env
+ - php82 vendor/bin/phpunit --group integration
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_REGISTRY_USER != null