Skip to content
Snippets Groups Projects
.gitlab-ci.yml 712 B
Newer Older
Tibo's avatar
Tibo committed
services:
  - mongo

Tibo's avatar
Tibo committed
## Cache composer packages between all jobs and all branches
## of this project...
cache:
  key: one-key-to-rull-them-all
  paths:
    - composer-cache/

Tibo's avatar
Tibo committed
.phptest:
  before_script:
    # Install all project dependencies
    - cd web
Tibo's avatar
Tibo committed
    - COMPOSER_CACHE_DIR=../composer-cache composer install
Tibo's avatar
Tibo committed
    # setup Laravel
    - cp env.test .env
    - touch storage/app/db.sqlite
    - php artisan migrate
Tibo's avatar
Tibo committed


Tibo's avatar
Tibo committed
# Test with PHP7.2 
Tibo's avatar
Tibo committed
test:php72:
Tibo's avatar
Tibo committed
  extends: .phptest
Tibo's avatar
Tibo committed
  image: cylab/php72
Tibo's avatar
Tibo committed
  script:
Tibo's avatar
Tibo committed
    - vendor/bin/phpunit --coverage-text
Tibo's avatar
Tibo committed
    - vendor/bin/phpcs
Tibo's avatar
Tibo committed

test:gitleaks:
  image: 
    name: "zricethezav/gitleaks"
    entrypoint: [""]
  script:
    - gitleaks -v --repo-path=./ --config=gitleaks.toml