Skip to content

Commit 4a318d9

Browse files
committed
Fix answer apt question
1 parent 43fd000 commit 4a318d9

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

.semaphore/semaphore.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ blocks:
9797
- node --version
9898
- npm --version
9999
- sem-service start postgres
100-
- sudo apt-get install libgtk2.0-0
100+
- sudo apt-get install -y libgtk2.0-0
101101
jobs:
102102
# TODO cypress require additional package to be installed on ci server
103103
- name: Client Tests

README.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Semaphore demo CI/CD pipeline using PHP Laravel
2+
3+
Example application and CI/CD pipeline showing how to run a PHP Laravel project
4+
on Semaphore 2.0.
5+
6+
## Local project setup
7+
8+
To setup the project locally, your local environment needs to meet common
9+
Laravel development requirements, as per [Laravel
10+
Documentation](https://laravel.com/docs/5.7#server-requirements).
11+
We recommend setting up using Vagrant and Homestead, as it is a turn key
12+
solution supported on all major operating systems.
13+
14+
Once the local environment is set up, you can run the following commands:
15+
16+
```
17+
cp .env.example .env // and enter your DB details in the newly created .env
18+
composer install
19+
php artisan key:generate
20+
php artisan migrate
21+
```
22+
23+
## CI/CD on Semaphore
24+
25+
Fork this repository and use it to [create a
26+
project](https://docs.semaphoreci.com/article/63-your-first-project):
27+
28+
```
29+
curl https://storage.googleapis.com/sem-cli-releases/get.sh | bash
30+
sem connect <semaphore-organization-link> <semaphore-id> // found in Semaphore Dashboard
31+
cd <project directory>
32+
sem init
33+
```
34+
35+
After that, push to the repository to trigger a workflow on Semaphore.
36+
37+
The CI pipeline will look like this:
38+
39+
![CI pipeline on Semaphore](public/ci-pipeline.png)
40+
41+
The example pipeline contains 6 blocks:
42+
43+
- Install Dependencies
44+
- installs and caches all composer and npm dependencies
45+
- Run Code Analysis
46+
- Runs PHP Mess Detector which as an example is installed as a composer dependency
47+
- Runs PHP Code Sniffer which as an example is installed as a composer dependency
48+
- Runs PHP Copy Detector which is called via cURL from the .phar package available online
49+
- Run Unit Tests
50+
- Runs PHPUnit Unit Tests
51+
- Run Browser Tests
52+
- Runs browser tests through Laravel Dusk.
53+
- Run Security Tests
54+
- Runs Sensiolabs security checker pulled in via cURL
55+
56+
## License
57+
58+
Copyright (c) 2019 Rendered Text
59+
60+
Distributed under the MIT License. See the file LICENSE.md.

0 commit comments

Comments
 (0)