Skip to content

Latest commit

 

History

History
107 lines (84 loc) · 2.98 KB

CONTRIBUTING.md

File metadata and controls

107 lines (84 loc) · 2.98 KB

Contributing

Active contribution and patches are very welcome. See the github issues. There are some tagged as easy-pick. To keep things in shape we have a bunch of unit tests. If you're submitting pull requests please make sure that they are still passing and if you add functionality please take a look at the coverage as well, it should be pretty high. :) Last, but not least, respect coding standards (we use php-cs-fixer for that);

First, fork or clone the repository

git clone git://github.com/PUGX/badge-poser.git
cd badge-poser

Configure your .env.local file

$ cp .env .env.local

Follow this link to generate your GitHub "Personal access token" and put them in .env.local file as the value of GITHUB_USERNAME.

Follow this link to generate your Bitbucket "App Password" and put them in .env.local file as the value of BITBUCKET_SECRET, add to BITBUCKET_TOKEN your username and into BITBUCKET_AUTH_METHOD value http_password

Follow this link to generate your CircleCI "Personal API Token" and put them in .env.local file as the value of CIRCLE_CI_TOKEN.

Make the same for the .env.test.local to run the test suite.

Manage App with docker-compose

Show the help

$ make help
Use: make <target>

GENERIC
  init                  initialize app (For the first initialize of the app)
  run                   run app
  start                 start docker containers
  stop                  stop docker containers
  dc_build_prod         rebuild docker compose containers to production environment
  purge                 cleaning
  status                docker containers status

DEV
  install               install php and node dependencies
  build_dev             build assets for dev environment
  build_watch           build assets and watch
  phpunit               run suite of tests
  php_cs_fixer          run php-cs-fixer
  phpstan               run phpstan
  analyse               run php-cs-fixer and phpstan

PROD
  install_prod          install PHP and node dependencies for production environment
  build_prod            build assets for production environment

For the first initialize of the app

$ make init

Add in /etc/hosts

127.0.0.1 poser.local

and now you can see the app on http://poser.local:8001

Otherwise, for the other days

$ make run

Go away

$ make stop

Build assets and remaining on watch

$ make build_watch

Run phpunit

$ make phpunit

Analyzes code (php-cs-fixer and phpstan)

$ make analyse

For the others allowed action execute

$ make help

ENJOY