This repository has been archived by the owner on Aug 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# PHP CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-php/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/php:7.3-apache-node-browsers # ...with this image as the primary container; this is where all `steps` will run | ||
environment: | ||
REVIEWDOG_VERSION: 0.9.11 | ||
This comment has been minimized.
Sorry, something went wrong. |
||
- image: circleci/postgres:11.6 | ||
environment: | ||
POSTGRES_DB: default | ||
POSTGRES_USER: default | ||
POSTGRES_PASSWORD: secret | ||
working_directory: ~/laravel # directory where steps will run | ||
|
||
steps: | ||
- checkout | ||
- run: | ||
name: Install and enable pdo_pgsql php extension | ||
command: | | ||
sudo apt-get update && sudo apt-get install libpq-dev | ||
sudo docker-php-ext-install bcmath json pdo_pgsql && sudo docker-php-ext-enable pdo_pgsql | ||
- run: sudo composer self-update | ||
|
||
# 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 | ||
- restore_cache: | ||
keys: | ||
- node-v1-{{ checksum "package.json" }} | ||
- node-v1- | ||
- run: yarn install | ||
- save_cache: | ||
key: node-v1-{{ checksum "package.json" }} | ||
paths: | ||
- node_modules | ||
- run: | ||
name: Install and build CRA | ||
command: | # TODO: cache | ||
yarn install | ||
yarn run build:production | ||
working_directory: ~/laravel/front | ||
- run: cp .env.ci .env.testing | ||
- run: php artisan key:generate --env=testing | ||
- run: php artisan migrate --env=testing --force | ||
|
||
- run: | ||
name: Run tests | ||
command: | | ||
./vendor/bin/phpunit --log-junit /tmp/test-results/phpunit/logfile.xml | ||
- store_test_results: | ||
path: /tmp/test-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_ENV=ci | ||
|
||
DB_CONNECTION=pgsql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=5432 | ||
DB_DATABASE=default | ||
DB_USERNAME=default | ||
DB_PASSWORD=secret |
reviewdogのバージョンが古いです