Coder Social home page Coder Social logo

sarannetventure / semaphore-demo-php-laravel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from semaphoreci-demos/semaphore-demo-php-laravel

0.0 0.0 0.0 750 KB

A Semaphore demo CI/CD pipeline using PHP Laravel

Home Page: https://docs.semaphoreci.com/article/114-laravel-php-continuous-integration

License: MIT License

PHP 78.82% Vue 0.46% Shell 0.55% Blade 20.17%

semaphore-demo-php-laravel's Introduction

CI status badge

Semaphore demo CI/CD pipeline using PHP Laravel

Example application and CI/CD pipeline showing how to run a PHP Laravel project on Semaphore 2.0.

Local project setup

To setup the project locally, your local environment needs to meet common Laravel development requirements, as per Laravel Documentation. We recommend setting up using Vagrant and Homestead, as it is a turn key solution supported on all major operating systems.

Once the local environment is set up, you can run the following commands:

cp .env.example .env // and enter your DB details in the newly created .env
composer install
php artisan key:generate
php artisan migrate

CI/CD on Semaphore

Fork this repository and use it to create a project, from web UI or command line:

curl https://storage.googleapis.com/sem-cli-releases/get.sh | bash
sem connect <semaphore-organization-link> <semaphore-id> // found in Semaphore Dashboard
cd <project directory>
sem init

After that, push to the repository to trigger a workflow on Semaphore.

The CI pipeline will look like this:

CI pipeline on Semaphore

The example pipeline contains 6 blocks:

  • Install Dependencies
    • installs and caches all composer and npm dependencies
  • Run Code Analysis
    • Runs PHP Mess Detector which as an example is installed as a composer dependency
    • Runs PHP Code Sniffer which as an example is installed as a composer dependency
    • Runs PHP Copy Detector which is called via cURL from the .phar package available online
  • Run Unit Tests
    • Runs PHPUnit Unit Tests
  • Run Browser Tests
    • Runs browser tests through Laravel Dusk.
  • Run Security Tests
    • Runs Sensiolabs security checker pulled in via cURL

License

Copyright (c) 2019 Rendered Text

Distributed under the MIT License. See the file LICENSE.md.

semaphore-demo-php-laravel's People

Contributors

markoa avatar dependabot[bot] avatar aleksandarcole avatar tomfern avatar savamarkovic avatar commanderk5 avatar aleksandar-mitrovic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.