diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..cbe2aa5f --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,92 @@ +version: 2 + +jobs: + frontend: + working_directory: ~/repo + docker: + - image: circleci/node:10 + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "yarn.lock" }} + - v1-dependencies- + - run: yarn + - save_cache: + paths: + - node_modules + - ~/.yarn + key: v1-dependencies-{{ checksum "yarn.lock" }} + - run: yarn lint + - run: yarn test --coverage + - run: yarn codecov + + install: + working_directory: ~/repo + docker: + - image: blessingskin/ci:7.1 + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "composer.lock" }} + - v1-dependencies- + - run: composer install -n --prefer-dist + - save_cache: + paths: + - vendor + key: v1-dependencies-{{ checksum "composer.lock" }} + - run: cp .env.testing .env + - run: php artisan key:random + - run: php artisan salt:random + - persist_to_workspace: + root: ~/repo + paths: + - . + + test_php71: + working_directory: ~/repo + docker: + - image: blessingskin/ci:7.1 + steps: + - attach_workspace: + at: ~/repo + - run: touch storage/testing.sqlite + - run: ./vendor/bin/phpunit --coverage-clover=coverage.xml + - run: bash <(curl -s https://codecov.io/bash) -cF php + + test_php72: + working_directory: ~/repo + docker: + - image: blessingskin/ci:7.2 + steps: + - attach_workspace: + at: ~/repo + - run: touch storage/testing.sqlite + - run: ./vendor/bin/phpunit + + test_php73: + working_directory: ~/repo + docker: + - image: blessingskin/ci:7.3 + steps: + - attach_workspace: + at: ~/repo + - run: touch storage/testing.sqlite + - run: ./vendor/bin/phpunit + +workflows: + version: 2 + install_and_test: + jobs: + - frontend + - install + - test_php71: + requires: + - install + - test_php72: + requires: + - install + - test_php73: + requires: + - install diff --git a/README.md b/README.md index 1ab1180a..0a7481ed 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

-
+
diff --git a/README_EN.md b/README_EN.md
index 53a4b270..f59945c5 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -4,7 +4,7 @@

-
+
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 4efd7048..00000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-jobs:
-- job: php
- displayName: PHP
- pool:
- vmImage: 'Ubuntu-16.04'
- strategy:
- matrix:
- '7.1':
- phpVersion: 7.1
- '7.2':
- phpVersion: 7.2
- variables:
- APP_ENV: testing
- DB_CONNECTION: mysql
- DB_DATABASE: test
- DB_USERNAME: root
- DB_PASSWORD: root
- steps:
- - script: |
- sudo update-alternatives --set php /usr/bin/php$(phpVersion)
- sudo update-alternatives --set phar /usr/bin/phar$(phpVersion)
- sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion)
- sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion)
- sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion)
- php -version
- displayName: 'Use PHP version $(phpVersion)'
-
- - script: composer install --no-interaction --prefer-dist
- displayName: Install dependencies
-
- - script: |
- cp .env.testing .env
- php artisan key:random
- php artisan salt:random
- mysql -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS test;'
- displayName: 'Prepare testing environment'
-
- - script: ./vendor/bin/phpunit --log-junit junit.xml
- displayName: Test
-
- - task: PublishTestResults@2
- condition: succeededOrFailed()
- inputs:
- testRunner: JUnit
- testResultsFiles: './junit.xml'
-
-- job: javascript
- displayName: JavaScript
- pool:
- vmImage: 'Ubuntu-16.04'
- steps:
- - script: yarn
- displayName: Install dependencies
-
- - script: |
- yarn lint
- yarn test --ci --reporters=default --reporters=jest-junit --coverage
- displayName: 'Run Test'
-
- - task: PublishTestResults@2
- condition: succeededOrFailed()
- inputs:
- testRunner: JUnit
- testResultsFiles: './junit.xml'
-
-- job: build
- displayName: Build & Compile
- condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
- dependsOn:
- - php
- - javascript
- pool:
- vmImage: 'Ubuntu-16.04'
- steps:
- - script: yarn
- displayName: Install dependencies
- - script: mkdir dist
- - script: yarn release dist/blessing-skin-server.zip --ci
- displayName: Generate package
- - task: PublishPipelineArtifact@0
- inputs:
- artifactName: 'blessing-skin-server.zip'
- targetPath: dist