edbizarro / gitlab-ci-pipeline-php

:coffee: Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
https://hub.docker.com/r/edbizarro/gitlab-ci-pipeline-php
MIT License
529 stars 167 forks source link

failed to open stream: Cannot assign requested address #103

Open lex64 opened 4 years ago

lex64 commented 4 years ago

Hi

I get an error while running phpunit

"message" => "file_get_contents(https://localhost/images/pdf-logos/zzz.png): failed to open stream: Cannot assign requested address"

I am using gitlab-ci-pipeline-php:7.3 image

And here is phpunit stage:

phpunit:
  stage: testing
  only:
    - merge_requests
  services:
    - name: mysql:8.0
      command: ["--default-authentication-plugin=mysql_native_password"]
    - name: redis:latest
  dependencies:
    - build-assets
    - composer
    - db-seeding
  script:
    - php -v
    - sudo cp /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.bak
    - echo "" | sudo tee /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
    - mysql --host="${DB_HOST}" --user="${MYSQL_USER}" --password="${MYSQL_PASSWORD}" "${MYSQL_DATABASE}" < db.sql
    - ./vendor/phpunit/phpunit/phpunit --version
    - php -d short_open_tag=off ./vendor/phpunit/phpunit/phpunit -v --colors=never --stderr --log-junit report.xml
    - sudo cp /usr/local/etc/php/conf.d/docker-php-ext-xdebug.bak /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
  artifacts:
    paths:
      - ./storage/logs # for debugging
      - report.xml
    reports:
      junit: report.xml
    expire_in: 30 days
    when: on_failure

Anyone can help with this ?