2018-08-27 21:33:39 -06: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-27 21:40:30 -06:00
|
|
|
# Specify the version you desire here
|
2024-07-22 01:32:24 -06:00
|
|
|
- image: cimg/php:8.3.8
|
2018-08-27 21:40:30 -06:00
|
|
|
|
2018-08-27 21:33:39 -06: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-27 21:40:30 -06:00
|
|
|
# Using the RAM variation mitigates I/O contention
|
|
|
|
# for database intensive operations.
|
|
|
|
# - image: circleci/mysql:5.7-ram
|
2019-05-09 21:15:22 +02:00
|
|
|
#
|
2018-08-27 21:40:30 -06:00
|
|
|
# - image: redis:2.8.19
|
2018-08-27 21:33:39 -06:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2024-03-31 16:10:28 -06:00
|
|
|
- run:
|
|
|
|
name: "Create Environment file and generate app key"
|
|
|
|
command: |
|
|
|
|
mv .env.testing .env
|
|
|
|
|
|
|
|
- run: sudo apt install zlib1g-dev libsqlite3-dev
|
2018-08-27 21:40:30 -06:00
|
|
|
|
2018-08-27 21:33:39 -06:00
|
|
|
# Download and cache dependencies
|
2018-08-27 21:40:30 -06:00
|
|
|
|
|
|
|
# composer cache
|
2018-08-27 21:33:39 -06:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-27 21:40:30 -06:00
|
|
|
# "composer.lock" can be used if it is committed to the repo
|
2023-04-19 23:06:44 -06:00
|
|
|
- v2-dependencies-{{ checksum "composer.json" }}
|
2018-08-27 21:33:39 -06:00
|
|
|
# fallback to using the latest cache if no exact match is found
|
2023-04-19 23:06:44 -06:00
|
|
|
- v2-dependencies-
|
2018-08-27 21:33:39 -06:00
|
|
|
|
|
|
|
- run: composer install -n --prefer-dist
|
|
|
|
|
|
|
|
- save_cache:
|
2024-03-31 16:10:28 -06:00
|
|
|
key: v2-dependencies-{{ checksum "composer.json" }}
|
2018-08-27 21:40:30 -06:00
|
|
|
paths:
|
|
|
|
- vendor
|
|
|
|
|
2023-05-07 05:15:29 -06:00
|
|
|
- run: php artisan config:cache
|
2019-11-10 19:40:22 -07:00
|
|
|
- run: php artisan route:clear
|
2018-08-27 21:59:28 -06:00
|
|
|
- run: php artisan storage:link
|
|
|
|
- run: php artisan key:generate
|
2018-08-27 21:55:47 -06:00
|
|
|
|
2018-08-27 21:40:30 -06:00
|
|
|
# run tests with phpunit or codecept
|
2024-03-31 16:10:28 -06:00
|
|
|
- run: php artisan test
|
2018-08-27 21:40:30 -06:00
|
|
|
- store_test_results:
|
|
|
|
path: tests/_output
|
|
|
|
- store_artifacts:
|
2019-05-09 21:15:22 +02:00
|
|
|
path: tests/_output
|