cache:
  paths:
    - vendor/
    - node_modules/
    - .env

before_script:
  - cp .env.example .env

building:
  stage: build
  except:
    - schedules
  script:
    - composer install
    - npm install
    - npm run build

testing:
  stage: test
  except:
    - schedules
  script:
    - composer install
    - npm install
    - npm run build
    - php artisan key:generate
    - php artisan config:cache
    - php artisan migrate:fresh
    - ./vendor/bin/phpunit tests
