Closed martinssipenko closed 4 years ago
@NoelDavies can I ask you to enable CircleCI for this project so I can set up the configuration?
@renatocason - Can you enable this under CircleCI please?
I believe this has been done.
Default provided config:
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
build:
docker:
# Specify the version you desire here
- image: circleci/php:7.1-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
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
- restore_cache:
keys:
- node-v1-{{ checksum "package.json" }}
- node-v1-
- run: yarn install
- save_cache:
key: node-v1-{{ checksum "package.json" }}
paths:
- node_modules
# prepare the database
- run: touch storage/testing.sqlite
- run: php artisan migrate --env=testing --database=sqlite_testing --force
# run tests with phpunit or codecept
#- run: ./vendor/bin/phpunit
- run: ./vendor/bin/codecept build
- run: ./vendor/bin/codecept run
Thanks, I'll look into adding sensible configuration and send a PR your way ASAP.
Much appreciated! Apologies for not getting on this sooner - we're pretty busy internally but always put time aside for our OSS stuff. :D
@renatocason @NoelDavies I've pushed a PR and it's not getting built, you need to change few settings: https://circleci.com/docs/2.0/oss/#build-pull-requests-from-forked-repositories
Hi @martinssipenko ,
This has been done - not sure we need the Pass Secrets to Builds From Forked Pull Requests bit, but let me know if that is the case.
Thanks, Renato
@renatocason sweet, thanks! We don't need that bit, it's potentially unsecure.
Okay, I've added the basis in #20.
I also added phpcs (PSR-12) in #21, which is based on #20 (we should rebase #21 after merging #20 master, of course we could decide to go with other standard.
Would it not be an idea to make these all one PR?
I din't want to block #20 with #21, in case you don't want to use PSR-12.
It seems that CI is missing after fork was made. I'd be happy to contribute to add CI pipeline for this project. I'd like to propose moving to CircleCI instead of using TravisCI, in my experience CircleCI is more robust and has more features, but I'm happy to contribute either way.