2018-08-28 03:33:39 +00:00
|
|
|
# PHP CircleCI 2.0 configuration file
|
|
|
|
#
|
|
|
|
# Check https://circleci.com/docs/2.0/language-php/ for more details
|
|
|
|
#
|
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2018-08-28 03:40:30 +00:00
|
|
|
# Specify the version you desire here
|
2021-12-15 06:07:17 +00:00
|
|
|
- image: cimg/php:7.4.26
|
2018-08-28 03:40:30 +00:00
|
|
|
|
2018-08-28 03:33:39 +00:00
|
|
|
# Specify service dependencies here if necessary
|
|
|
|
# CircleCI maintains a library of pre-built images
|
|
|
|
# documented at https://circleci.com/docs/2.0/circleci-images/
|
2018-08-28 03:40:30 +00:00
|
|
|
# Using the RAM variation mitigates I/O contention
|
|
|
|
# for database intensive operations.
|
|
|
|
# - image: circleci/mysql:5.7-ram
|
2019-05-09 19:15:22 +00:00
|
|
|
#
|
2018-08-28 03:40:30 +00:00
|
|
|
# - image: redis:2.8.19
|
2018-08-28 03:33:39 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2018-08-28 03:40:30 +00:00
|
|
|
- run: sudo apt update && sudo apt install zlib1g-dev libsqlite3-dev
|
|
|
|
|
2018-08-28 03:33:39 +00:00
|
|
|
# Download and cache dependencies
|
2018-08-28 03:40:30 +00:00
|
|
|
|
|
|
|
# composer cache
|
2018-08-28 03:33:39 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-28 03:40:30 +00:00
|
|
|
# "composer.lock" can be used if it is committed to the repo
|
2018-08-28 03:33:39 +00:00
|
|
|
- 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:
|
2018-08-28 03:40:30 +00:00
|
|
|
key: composer-v1-{{ checksum "composer.lock" }}
|
|
|
|
paths:
|
|
|
|
- vendor
|
|
|
|
|
2019-11-11 02:40:22 +00:00
|
|
|
- run: cp .env.testing .env
|
|
|
|
- run: php artisan route:clear
|
2018-08-28 03:59:28 +00:00
|
|
|
- run: php artisan storage:link
|
|
|
|
- run: php artisan key:generate
|
|
|
|
- run: php artisan config:clear
|
2018-08-28 03:55:47 +00:00
|
|
|
|
2018-08-28 03:40:30 +00:00
|
|
|
# run tests with phpunit or codecept
|
|
|
|
- run: ./vendor/bin/phpunit
|
|
|
|
- store_test_results:
|
|
|
|
path: tests/_output
|
|
|
|
- store_artifacts:
|
2019-05-09 19:15:22 +00:00
|
|
|
path: tests/_output
|