mirror of https://github.com/hasinhayder/hydra
parent
ac70f244df
commit
f97a0612b4
@ -0,0 +1,64 @@
|
|||||||
|
# PHP CircleCI 2.0 configuration file
|
||||||
|
# See: https://circleci.com/docs/2.0/language-php/
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
# Define a job to be invoked later in a workflow.
|
||||||
|
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
|
||||||
|
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
|
||||||
|
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
|
||||||
|
|
||||||
|
# Add steps to the job
|
||||||
|
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
|
||||||
|
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
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "Create Environment file and generate app key"
|
||||||
|
command: |
|
||||||
|
mv .env.example .env
|
||||||
|
php artisan key:generate
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "Create database and run migration"
|
||||||
|
command: |
|
||||||
|
touch database/hydra.sqlite
|
||||||
|
php artisan migrate
|
||||||
|
php artisan db:seed
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: "Run Tests"
|
||||||
|
command: ./vendor/bin/phpunit
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue