From 919e11ff400362bd5e1c5c3ea63f35312bc37206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Vil=C3=A0?= Date: Mon, 30 Nov 2020 17:45:20 +0100 Subject: [PATCH 1/3] Add .circleci/config.yml --- .circleci/config.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4f6a1e9 --- /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.4-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 From b40e4bf2db1a4f4dbb2072615638f12850f21001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Vil=C3=A0?= Date: Mon, 30 Nov 2020 17:47:59 +0100 Subject: [PATCH 2/3] Update config.yml --- .circleci/config.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f6a1e9..9e25f46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: build: docker: # Specify the version you desire here - - image: circleci/php:7.4-node-browsers + - image: circleci/php:7.4-apache # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images @@ -21,7 +21,7 @@ jobs: 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-get update -y # 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 @@ -38,21 +38,12 @@ jobs: 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: 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/phpunit - run: ./vendor/bin/codecept build - run: ./vendor/bin/codecept run From 1be1ecf286506c724232ef1d055e1bcbf77a4dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Vil=C3=A0?= Date: Mon, 30 Nov 2020 17:49:24 +0100 Subject: [PATCH 3/3] Update config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e25f46..af8f9b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: # fallback to using the latest cache if no exact match is found - v1-dependencies- - - run: composer install -n --prefer-dist + - run: composer selfupdate && composer install -n --prefer-dist - save_cache: key: v1-dependencies-{{ checksum "composer.json" }} @@ -45,5 +45,5 @@ jobs: # run tests with phpunit or codecept - run: ./vendor/bin/phpunit - - run: ./vendor/bin/codecept build - - run: ./vendor/bin/codecept run + # - run: ./vendor/bin/codecept build + # - run: ./vendor/bin/codecept run