Skip to content

Instantly share code, notes, and snippets.

@Thirdwrist
Created February 3, 2019 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thirdwrist/4116dbae377fcc73034d7fdc40d1e96a to your computer and use it in GitHub Desktop.
Save Thirdwrist/4116dbae377fcc73034d7fdc40d1e96a to your computer and use it in GitHub Desktop.
# 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-jessie-node-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
#a 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 && sudo apt install zlib1g-dev libsqlite3-dev
- run: sudo docker-php-ext-install zip
# Download and cache dependencies
# composer cache
- 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: composer-v1-{{ checksum "composer.lock" }}
paths:
- vendor
# node cache
- restore_cache:
keys:
- node-v3-{{ checksum "package.json" }}
- node-v3-
- run: yarn install
- save_cache:
key: node-v3-{{ checksum "package.json" }}
paths:
- node_modules
- ~/.yarn
# 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 --xml result.xml
- store_test_results:
path: tests/_output
- store_artifacts:
path: tests/_output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment