From a5444fe881eb8e815c447b180e9a542b9746d9ee Mon Sep 17 00:00:00 2001 From: abbadon1334 Date: Wed, 10 Jul 2019 18:02:40 +0300 Subject: [PATCH] add CircleCI --- .circleci/config.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 9 ++++++- composer.json | 1 + phpunit.xml | 2 +- 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..ee76f23 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,58 @@ +# 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 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # Using the RAM variation mitigates I/O contention + # for database intensive operations. + # - image: circleci/mysql:5.7-ram + # + # - image: redis:2.8.19 + + steps: + - checkout + + - run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev + - run: sudo docker-php-ext-install zip + + # 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 + - restore_cache: + keys: + - node-v1-{{ checksum "package.json" }} + - node-v1- + - run: yarn install + - save_cache: + key: node-v1-{{ checksum "package.json" }} + paths: + - node_modules + + # prepare the database + - run: touch storage/testing.sqlite + - run: php artisan migrate --env=testing --database=sqlite_testing --force + + # run tests with phpunit or codecept + #- run: ./vendor/bin/phpunit + - run: ./vendor/bin/codecept build + - run: ./vendor/bin/codecept run \ No newline at end of file diff --git a/README.md b/README.md index 2d40427..ebc3059 100755 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# i18next \ No newline at end of file +# i18next +[![Build Status](https://travis-ci.org/abbadon1334/atk4-i18next-php.svg?branch=master)](https://travis-ci.org/abbadon1334/atk4-i18next-php) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3936f18bcf2d47c38713dc49dc4cd44b)](https://www.codacy.com/app/abbadon1334/atk4-i18next-php?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/atk4-i18next-php&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/3936f18bcf2d47c38713dc49dc4cd44b)](https://www.codacy.com/app/abbadon1334/atk4-i18next-php?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/atk4-i18next-php&utm_campaign=Badge_Coverage) +[![Coverage Status](https://coveralls.io/repos/github/abbadon1334/atk4-i18next-php/badge.svg?branch=master)](https://coveralls.io/github/abbadon1334/atk4-i18next-php?branch=master) +[![StyleCI](https://github.styleci.io/repos/196214699/shield?branch=master)](https://github.styleci.io/repos/196214699) +[![Maintainability](https://api.codeclimate.com/v1/badges/6aa647f7e846726e4f89/maintainability)](https://codeclimate.com/github/abbadon1334/atk4-i18next-php/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/6aa647f7e846726e4f89/test_coverage)](https://codeclimate.com/github/abbadon1334/atk4-i18next-php/test_coverage) diff --git a/composer.json b/composer.json index 2eaf8ef..7bda04e 100755 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "atk4/core": "dev-develop@dev" }, "require-dev": { + "atk4/data": "dev-develop@dev", "codacy/coverage": "dev-master@dev", "friendsofphp/php-cs-fixer": "dev-master@dev", "phpmd/phpmd": "2.6.1", diff --git a/phpunit.xml b/phpunit.xml index e242d08..3355bbe 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,7 +16,7 @@ - + ./tests