From 8ae52e0ae88b309a0393ef5a8322a8305fc7d294 Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Wed, 7 Oct 2020 11:09:04 -0500 Subject: [PATCH 1/7] Update circleci config to be more modular --- .circleci/config.yml | 81 ++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4918d10..973f377 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,33 +4,21 @@ # 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 + multi-test: &multi-test + docker: + - image: node - steps: + 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 apt install zlib1g-dev libsqlite3-dev + - run: sudo apt update + - run: sudo apt install zlib1g-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 @@ -49,20 +37,55 @@ jobs: paths: - node_modules - # run tests with phpunit or codecept - #- run: 'if [[ ! ${TRAVIS_PHP_VERSION:0:3} < "5.5" ]]; then composer require overtrue/phplint; composer require squizlabs/php_codesniffer; ./vendor/bin/phplint; ./vendor/bin/phpcs; fi' - #- run: 'phpunit' - - run: - name: 'Running unit tests' - command: './vendor/bin/phpunit test' - - run: + -run: + - e2e + - codecov + + + e2e: + steps: + - run: name: 'Running E2E tests' command: '.buildscript/e2e.sh' - - run: + codecov: + steps: + - run: when: on_success name: 'Code coverage' command: 'bash <(curl -s https://codecov.io/bash)' - #- run: ./vendor/bin/phpunit - #- run: ./vendor/bin/codecept build - #- run: ./vendor/bin/codecept run \ No newline at end of file + test-php5: + <<: *multi-test + docker: + - image: circleci/php:5-node-browsers + + test-php5.6: + <<: *multi-test + docker: + - image: circleci/php:5.6-node-browsers + + test-php7.1: + <<: *multi-test + docker: + - image: circleci/php:7.1-node-browsers + + test-php7.3: + <<: *multi-test + docker: + - image: circleci/php:7.3-node-browsers + + test-php7.4: + <<: *multi-test + docker: + - image: circleci/php:7.4-node-browsers + + +workflows: + version: 2 + multi-test: + jobs: + - test-php5 + - test-php5.6 + - test-php7.1 + - test-php7.3 + - test-php7.4 From b75c6971651ff8a037d6b09d3118acc24486d659 Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Wed, 7 Oct 2020 12:22:55 -0500 Subject: [PATCH 2/7] Fix formatting and syntax errors after re-write --- .circleci/config.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 973f377..26df9e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,15 +4,12 @@ # version: 2 jobs: - multi-test: &multi-test - docker: - - image: node - - steps: + docker: + - image: php + steps: - checkout - - - run: sudo apt update + - run: sudo apt update - run: sudo apt install zlib1g-dev - run: sudo docker-php-ext-install zip @@ -36,12 +33,10 @@ jobs: key: node-v1-{{ checksum "composer.json" }} paths: - node_modules - - -run: + - run: - e2e - codecov - e2e: steps: - run: @@ -77,9 +72,7 @@ jobs: test-php7.4: <<: *multi-test docker: - - image: circleci/php:7.4-node-browsers - - + - image: circleci/php:7.4-node-browsers workflows: version: 2 multi-test: @@ -88,4 +81,4 @@ workflows: - test-php5.6 - test-php7.1 - test-php7.3 - - test-php7.4 + - test-php7.4 \ No newline at end of file From 70cb079fbd7004ce477b3d2520352788f4184b76 Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Wed, 7 Oct 2020 12:27:46 -0500 Subject: [PATCH 3/7] Add in unit test ater conversion --- .circleci/config.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26df9e4..6c091cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,17 +34,12 @@ jobs: paths: - node_modules - run: - - e2e - - codecov - - e2e: - steps: - - run: + name: 'Running unit tests' + command: './vendor/bin/phpunit test' + - run: name: 'Running E2E tests' command: '.buildscript/e2e.sh' - codecov: - steps: - - run: + - run: when: on_success name: 'Code coverage' command: 'bash <(curl -s https://codecov.io/bash)' From f38fe93242c343d19cb2ca1ea5d9a43ec7f7cd83 Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Wed, 7 Oct 2020 13:25:47 -0500 Subject: [PATCH 4/7] remove unsupported php versions, current minimum version is 7.3 --- .circleci/config.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c091cb..2aac747 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,25 +44,10 @@ jobs: name: 'Code coverage' command: 'bash <(curl -s https://codecov.io/bash)' - test-php5: + test-php7.2: <<: *multi-test docker: - - image: circleci/php:5-node-browsers - - test-php5.6: - <<: *multi-test - docker: - - image: circleci/php:5.6-node-browsers - - test-php7.1: - <<: *multi-test - docker: - - image: circleci/php:7.1-node-browsers - - test-php7.3: - <<: *multi-test - docker: - - image: circleci/php:7.3-node-browsers + - image: circleci/php:7.2-node-browsers test-php7.4: <<: *multi-test @@ -72,8 +57,5 @@ workflows: version: 2 multi-test: jobs: - - test-php5 - - test-php5.6 - - test-php7.1 - - test-php7.3 + - test-php7.2 - test-php7.4 \ No newline at end of file From 57bc3a0dd51ffbc8974fd63a805a8de30720e32c Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Wed, 7 Oct 2020 13:25:47 -0500 Subject: [PATCH 5/7] remove unsupported php versions, current minimum version is 7.2 --- .circleci/config.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c091cb..2aac747 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,25 +44,10 @@ jobs: name: 'Code coverage' command: 'bash <(curl -s https://codecov.io/bash)' - test-php5: + test-php7.2: <<: *multi-test docker: - - image: circleci/php:5-node-browsers - - test-php5.6: - <<: *multi-test - docker: - - image: circleci/php:5.6-node-browsers - - test-php7.1: - <<: *multi-test - docker: - - image: circleci/php:7.1-node-browsers - - test-php7.3: - <<: *multi-test - docker: - - image: circleci/php:7.3-node-browsers + - image: circleci/php:7.2-node-browsers test-php7.4: <<: *multi-test @@ -72,8 +57,5 @@ workflows: version: 2 multi-test: jobs: - - test-php5 - - test-php5.6 - - test-php7.1 - - test-php7.3 + - test-php7.2 - test-php7.4 \ No newline at end of file From af8539ec12c0718bc8c093acb1fd6e2f6139ca06 Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Tue, 13 Oct 2020 15:28:36 -0500 Subject: [PATCH 6/7] moved coverage to its own job --- .circleci/config.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2aac747..337f463 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,14 @@ # version: 2 jobs: + + coverage: + steps: + - run: + when: on_success + name: 'Code coverage' + command: 'bash <(curl -s https://codecov.io/bash)' + multi-test: &multi-test docker: - image: php @@ -39,10 +47,7 @@ jobs: - run: name: 'Running E2E tests' command: '.buildscript/e2e.sh' - - run: - when: on_success - name: 'Code coverage' - command: 'bash <(curl -s https://codecov.io/bash)' + test-php7.2: <<: *multi-test @@ -57,5 +62,6 @@ workflows: version: 2 multi-test: jobs: + - coverage - test-php7.2 - test-php7.4 \ No newline at end of file From 715b7934d7f90679fd92495c71cc394cc78d38e2 Mon Sep 17 00:00:00 2001 From: "Shane L. Duvall" Date: Tue, 13 Oct 2020 15:49:53 -0500 Subject: [PATCH 7/7] syntax update --- .circleci/config.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 337f463..fcdf082 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,11 +6,10 @@ version: 2 jobs: coverage: + docker: + - image: circleci/php:7.2-node-browsers steps: - - run: - when: on_success - name: 'Code coverage' - command: 'bash <(curl -s https://codecov.io/bash)' + - run: 'bash <(curl -s https://codecov.io/bash)' multi-test: &multi-test docker: @@ -48,12 +47,10 @@ jobs: name: 'Running E2E tests' command: '.buildscript/e2e.sh' - test-php7.2: <<: *multi-test docker: - image: circleci/php:7.2-node-browsers - test-php7.4: <<: *multi-test docker: