Skip to content

This is a docker image for php backend services with node to compile and test frontend.

License

Notifications You must be signed in to change notification settings

csutorasr/node-php-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-php-docker

This is an docker image for php backend services with node to compile frontend.

Usage

Install PHPUnit with the image and your node modules you test with (e.g. Karma). Run the test with the commands.

Configuration

Bitbucket pipelines

You should add karma-phantomjs2-launcher as a development dependency in your app and run angular tests with that. For me polyfills were needed. I imported them in the src/test.ts in the angular-cli project.

Example project:

The angular code is in the /angular folder. Composer project directory is /.

bitbucket-pipelines.yml:

image: csutorasr/node-php

pipelines:
  branches:
    master:
      - step:
          caches:
            - composer
            - node
            - node-angular
          script:
            - npm run composer:install
            - npm run composer:test:linux
            - npm run angular:install
            - npm run angular:test

definitions:
  caches:
    node-angular: angular/node_modules

package.json: (needed scripts)

    "composer:install": "composer install",
    "composer:test:linux": "cd vendor/bin && ./phpunit --bootstrap ../autoload.php ../../tests",
    "angular:install": "cd angular && npm install",
    "angular:test": "cd angular && npm run test:single",

About

This is a docker image for php backend services with node to compile and test frontend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages