phpldapadmin/.gitlab-ci.yml

65 lines
1.9 KiB
YAML
Raw Normal View History

2020-08-23 02:30:18 +00:00
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/php
image: registry.leenooks.net/leenooks/php:7.4-fpm-mp-test
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
services:
- name: osixia/openldap:latest
alias: ldap
command: ["--loglevel","debug"]
variables:
LDAP_SEED_INTERNAL_LDIF_PATH: "${CI_PROJECT_DIR}/tests/server/openldap/ldif"
LDAP_BASE_DN: "dc=Test"
LDAP_DOMAIN: "Test"
LDAP_ADMIN_PASSWORD: test
# LDAP_SEED_INTERNAL_SCHEMA_PATH: "${CI_PROJECT_DIR}/tests/server/openldap/schema"
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor/
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
# Install Composer and project dependencies.
- mkdir -p /root/.composer
- if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > /root/.composer/auth.json ; fi
- composer install
# Copy over testing configuration.
# Don't forget to set the database config in .env.testing correctly
# DB_HOST=mysql
# DB_DATABASE=project_name
# DB_USERNAME=root
# DB_PASSWORD=secret
# Generate an application key. Re-cache.
- php artisan key:generate --env=testing
- php artisan config:cache --env=testing
test:
variables:
LDAP_HOST: ldap
LDAP_PORT: 389
tags:
- php
only:
- BRANCH-2.0
script:
# run laravel tests
- php vendor/bin/phpunit --coverage-text --colors=never
# run frontend tests
# if you have any task for testing frontend
# set it in your package.json script
# comment this out if you don't have a frontend test
# npm test