From ea956e8a8eabe1d96d275c3c038d97b320347e92 Mon Sep 17 00:00:00 2001 From: Julien Bourdeau Date: Sat, 17 Jul 2021 11:13:50 +0200 Subject: [PATCH] Add .circleci/config.yml --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ .editorconfig | 15 -------------- .travis.yml | 16 --------------- 3 files changed, 49 insertions(+), 31 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .editorconfig delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..a15864e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +# PHP CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-php/ for more details +# +version: 2 +jobs: + build: + docker: + # Specify the version you desire here + - image: circleci/php:7.1-node-browsers + - image: circleci/mysql:5.7 + + environment: + MYSQL_HOST: 127.0.0.1 + MYSQL_ALLOW_EMPTY_PASSWORD: true + MYSQL_ROOT_PASSWORD: null + MYSQL_USER: root + MYSQL_DATABASE: test_route_usage + + steps: + - checkout + + - run: + name: Install libs + command: | + sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev + sudo docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd + sudo docker-php-ext-install zip bcmath pdo_mysql + sudo apt-get install default-mysql-client + + # Download and cache dependencies + - restore_cache: + keys: + # "composer.lock" can be used if it is committed to the repo + - v1-dependencies-{{ checksum "composer.json" }} + # fallback to using the latest cache if no exact match is found + # - v1-dependencies- + + - run: composer install -n --prefer-dist + + - save_cache: + key: v1-dependencies-{{ checksum "composer.json" }} + paths: + - ./vendor + + - run: mysql -uroot -e 'CREATE DATABASE test_route_usage;' + + # Run tests + - run: ./vendor/bin/phpunit diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index cd8eb86..0000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 4 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e087bed..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -php: - - 7.4 - -services: - - mysql - -install: - - mysql -e 'CREATE DATABASE test_route_usage;' - -before_script: - - travis_retry composer update --no-interaction --no-suggest --prefer-source - -script: - - vendor/bin/phpunit