symfony / panther

A browser testing and web crawling library for PHP and Symfony
MIT License
2.94k stars 222 forks source link

Example to Gitlab #229

Closed andreybolonin closed 5 years ago

andreybolonin commented 5 years ago

Any examples to run Panther on Gitlab CI ?

Screen Shot 2019-09-03 at 8 33 22 AM

My .gitlab-ci.yml `image: ubuntu:bionic

services:

variables: POSTGRES_PASSWORD: root POSTGRES_USER: root POSTGRES_DB: vipaero

PANTHER_CHROME_DRIVER_BINARY: /usr/lib/chromium/chromedriver

PANTHER_NO_SANDBOX: 1

before_script:

stages:

test: script:

Bersman commented 5 years ago

This is working for me: My .gitlab-ci.yml file:

image: php:7.2-fpm-alpine
cache:
  paths:
    - vendor/
before_script:
  - apk add --no-cache chromium chromium-chromedriver zlib-dev
  - export PANTHER_CHROME_DRIVER_BINARY="/usr/lib/chromium/chromedriver"
  - export PANTHER_NO_SANDBOX=1
  - export PANTHER_WEB_SERVER_PORT=9800
  - docker-php-ext-install zip
  - curl -sS https://getcomposer.org/installer | php
  - php composer.phar install

test:
  script:
    - chromedriver --version
    - ./bin/phpunit --colors=never
andreybolonin commented 5 years ago

@Bersman thx