From aef701d5a8f1e441d590526f94eb891ef9f61056 Mon Sep 17 00:00:00 2001 From: Jonathan Gruber Date: Wed, 6 Mar 2019 10:12:51 +0100 Subject: [PATCH] Add CircleCI --- .circleci/config.yml | 22 ++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..f374be9 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,22 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/php:7.2-cli + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "composer.lock" }} + - v1-dependencies- # fallback + - run: composer install -n --prefer-dist + - save_cache: + key: v1-dependencies-{{ checksum "composer.lock" }} + paths: + - ./vendor + + # Run unit tests + - run: composer test diff --git a/README.md b/README.md index 7b484ef..bed0d50 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Bing Daily Photo +[![CircleCI](https://circleci.com/gh/grubersjoe/bing-daily-photo.svg?style=shield)](https://circleci.com/gh/grubersjoe/bing-daily-photo) + BingPhoto is a simple PHP class to fetch Bing's image of the day with meta data. It is also possible to cache the images locally, which can be useful in combination with a periodic cronjob. See the `cacheDir` parameter for this (optional) feature. Disclaimer: this might be a copyright issue.