Skip to content

Commit

Permalink
Update Circle CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rdohms committed Jul 19, 2019
1 parent 099500e commit bb3ea0e
Show file tree
Hide file tree
Showing 5 changed files with 6,231 additions and 27 deletions.
60 changes: 60 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: 2

jobs:
build:
docker:
- image: circleci/php:7.2
steps:
- run: sudo composer self-update
- checkout

- run: npm install
- run: node_modules/.bin/encore prod

- restore_cache:
keys:
- project-dependencies-{{ checksum "~/project/composer.lock" }}
- composer-cache

- run: composer install -n -o

- save_cache:
key: project-dependencies-{{ checksum "~/project/composer.lock" }}
paths:
- ~/project/vendor
- save_cache:
key: composer-cache
paths:
- ~/.composer/cache

- run: make test
- store_test_results:
path: ~/phpunit
- store_artifacts:
path: ~/phpunit

deploy:
docker:
- image: circleci/php:7.2
steps:
- checkout
- run: npm install
- run: node_modules/.bin/encore prod
- restore_cache:
keys:
- project-dependencies-{{ checksum "~/project/composer.lock" }}
- composer-cache
- run: cp ~/.ssh/id_amsterdamphp.nl ~/.ssh/id_rsa
- run: ./vendor/bin/dep deploy

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy:
filters:
branches:
only: master
requires:
- build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ web/js/*
/.phpunit.result.cache
/var/
!/var/.gitkeep

cache/*
logs/*
###> symfony/webpack-encore-bundle ###
/node_modules/
/web/build/
Expand Down
24 changes: 0 additions & 24 deletions circle.yml

This file was deleted.

4 changes: 2 additions & 2 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Set configurations
set('repository', '[email protected]:AmsterdamPHP/meetup-raffle-machine.git');
set('shared_files', ['config/parameters.yml']);
set('shared_dirs', ['var']);
set('writable_dirs', []);
set('shared_dirs', ['cache', 'logs']);
set('writable_dirs', ['cache', 'logs']);

// Configure servers
server('production', 'amsterdamphp.nl')
Expand Down
Loading

0 comments on commit bb3ea0e

Please sign in to comment.