Skip to content

Commit

Permalink
fix: OSX on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Jan 13, 2019
1 parent dd0ff5c commit a6a9ed8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 27 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
51 changes: 25 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
dist: trusty
language: php
sudo: required

before_install:
- openssl aes-256-cbc -K $encrypted_ab8f92ccaef0_key -iv $encrypted_ab8f92ccaef0_iv
-in scripts/sudo-bot/keys.tar.enc -out scripts/sudo-bot/keys.tar -d
- tar -C scripts/sudo-bot/ -xvf scripts/sudo-bot/keys.tar
- openssl aes-256-cbc -K $encrypted_ab8f92ccaef0_key -iv $encrypted_ab8f92ccaef0_iv -in scripts/sudo-bot/keys.tar.enc -out scripts/sudo-bot/keys.tar -d
- tar -C scripts/sudo-bot/ -xvf scripts/sudo-bot/keys.tar
before_script:
- "./scripts/ci/install-reporters.sh"
- "./scripts/ci/install.sh"
- './scripts/ci/install-reporters.sh'
- './scripts/ci/install.sh'
script:
- ./scripts/ci/ci-$CI_TYPE.sh
- ./scripts/ci/ci-$CI_TYPE.sh
install:
- flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest
--no-progress"
- composer install $flags
- flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-suggest --no-progress"
- composer install $flags
after_success:
- bash <(curl -s https://codecov.io/bash)
- if [ "$CI_TYPE" != "cron" ]; then bash <(curl -s https://codecov.io/bash); else echo "skipped codecov"; fi
after_script:
- "./codacy-coverage.phar clover build/logs/clover.xml"
- if [ "$CI_TYPE" != "cron" ]; then ./codacy-coverage.phar clover build/logs/clover.xml; else echo "skipped codacy"; fi
stages:
- name: tests
if: NOT type = cron
Expand All @@ -29,40 +25,43 @@ jobs:
- stage: tests
php: '7.2'
env: CI_TYPE=phpstan
name: "PHPSTAN - PHP 7.2"
name: 'PHPSTAN - PHP 7.2'
- stage: tests
php: '7.2'
env: CI_TYPE=phpcs
name: "PHPCS - PHP 7.1"
name: 'PHPCS - PHP 7.1'
- stage: tests
php: '7.1'
env: CI_TYPE=phpunit
name: "PHPUNIT - PHP 7.1"
name: 'PHPUNIT - PHP 7.1'
- stage: tests
php: '7.2'
env: CI_TYPE=phpunit
name: "PHPUNIT - PHP 7.2"
name: 'PHPUNIT - PHP 7.2'
- stage: tests
os: osx
language: generic
php: '7.2'
env: CI_TYPE=phpunit
name: "PHPUNIT - PHP 7.2"
name: 'PHPUNIT - PHP 7.2'
before_install:
- "./scripts/ci/install-osx.sh"
- './scripts/ci/install-osx.sh'
- stage: robot
php: '7.2'
env: CI_TYPE=cron
name: "Create a pull-request to update data"
name: 'Create a pull-request to update data'
cache:
ccache: true
apt: true
directories:
- "$HOME/.composer/cache/"
- "$HOME/.cache/bower"
- "$HOME/.npm"
- "$HOME/.cache/ci"
- "/var/cache/apt"
- "~/Library/Caches/Homebrew"
- $HOME/.composer/cache/
- $HOME/.cache/bower
- $HOME/.npm
- $HOME/.cache/ci
- /var/cache/apt
- $HOME/Library/Caches/Homebrew
before_cache:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cleanup; fi
addons:
apt:
update: false
Expand Down
6 changes: 5 additions & 1 deletion scripts/ci/install-osx.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash

mkdir ~/.homebrew_logs
export HOMEBREW_LOGS="~/.homebrew_logs"
export HOMEBREW_TEMP="/tmp"
export HOMEBREW_INSTALL_BADGE="🌻"
brew update
brew install openldap libiconv php@7.2 composer
sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini

0 comments on commit a6a9ed8

Please sign in to comment.