M
M
Maxim Grechushnikov2015-05-19 16:28:57
PHP
Maxim Grechushnikov, 2015-05-19 16:28:57

PHPCI: Who worked? Can you answer a couple of questions?

I decided to get acquainted with this miracle and with CI in general. There are a couple of questions:
1. Why does phpci keep copying my bitbucket project over and over instead of making a git update valid? how can you avoid constantly deploying the application from scratch? The issue is clearly solvable and I just don't see how to solve it. I have a test project set for half an hour, and if I took a larger project, there would be an assembly of 4 or more.
2. I didn’t understand something, maybe it worked, how could I specify the use of a specific database for a test deployment? I don't store the settings in the database in the git in principle
3. Has anyone used this software in conjunction with Yii2? well, or another frame. Could you share phpci.yml?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Grechushnikov, 2015-05-21
@maxyc_webber

1. copies from scratch, because you always need a clean system for tests. if you do the assembly once a day / week / month, then everything is OK, it will not be expensive
2. in the process of studying)
3. so far I have only checked the quality of the code. still learning autotests

build_settings:
  ignore:
    - "vendor"
    - "tests"
    - "requirements.php"
    - "web"
    - ".idea"
    - "migrations"
setup:
  shell:
    - "export PATH=$PATH:$HOME/.composer/vendor/bin:/usr/local/bin/"
    #- "/usr/local/bin/composer install"
test:
  technical_debt:
  php_mess_detector:
  php_code_sniffer:
    encoding : 'UTF-8'
  php_loc:
  php_docblock_checker:

I use the composer through the shell because in the path it does not see its
description of the tests there is on the PHPCI website

D
Dmitry Khomutov, 2018-04-23
@Corpsee

2. Something like this:

build_settings:
    mysql:
        host: 'localhost'
        user: 'testuser'
        pass: '12345678'
    pgsql:
        host: 'localhost'
        user: 'testuser'
        pass: '12345678'
    sqlite:
        path: '/path/to/sqlite.sqlite'
    ...
setup:
    mysql:
        - "CREATE DATABASE test_1;"
    pgsql:
        - "CREATE DATABASE test_2;"
    sqlite:
        - "CREATE DATABASE test_3;"
    ...
complete:
    mysql:
        - "DROP DATABASE test_1;"
    pgsql:
        - "DROP DATABASE test_2;"
    sqlite:
        - "DROP DATABASE test_3;"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question