-
-
-
-
- @foreach ($new->pictures as $picture)
-
- @endforeach
+
+
+
Date: Sun, 21 Jun 2020 12:15:32 -0400
Subject: [PATCH 2/4] Update CI/CD
---
.gitlab-ci.yml | 11 +++++++-
.phpunit.result.cache | 2 +-
Dockerfile | 2 +-
Envoy.blade.php | 6 +++++
tests/Feature/AdminTest.php | 2 +-
tests/Feature/ECCTest.php | 54 -------------------------------------
6 files changed, 19 insertions(+), 58 deletions(-)
delete mode 100644 tests/Feature/ECCTest.php
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fd67162b..f3d3fbaa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,8 +11,17 @@ variables:
stages:
- build
+ - test
- deploy
- - deploy
+
+unit_test:
+ stage: test
+ script:
+ - cp .env.example .env
+ - composer install
+ - php artisan key:generate
+ - php artisan migrate
+ - vendor/bin/phpunit
build:
stage: build
diff --git a/.phpunit.result.cache b/.phpunit.result.cache
index c6a7c98c..c6c092d1 100644
--- a/.phpunit.result.cache
+++ b/.phpunit.result.cache
@@ -1 +1 @@
-C:30:"PHPUnit\Runner\TestResultCache":187:{a:2:{s:7:"defects";a:1:{s:32:"Tests\Browser\UserTest::testUser";i:3;}s:5:"times";a:2:{s:34:"Tests\Browser\LoginTest::testLogin";d:5.605;s:32:"Tests\Browser\UserTest::testUser";d:14.139;}}}
\ No newline at end of file
+C:37:"PHPUnit\Runner\DefaultTestResultCache":272:{a:2:{s:7:"defects";a:2:{s:32:"Tests\Feature\AdminTest::testUrl";i:3;s:30:"Tests\Feature\ECCTest::testUrl";i:3;}s:5:"times";a:3:{s:32:"Tests\Feature\AdminTest::testUrl";d:0.098;s:30:"Tests\Feature\ECCTest::testUrl";d:0.014;s:33:"Tests\Feature\PublicTest::testUrl";d:0.03;}}}
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index d399c989..146a6e18 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# Set the base image for subsequent instructions
-FROM php:7.3
+FROM php:7.4
# Update packages
RUN apt-get update
diff --git a/Envoy.blade.php b/Envoy.blade.php
index 9ac6ba0a..ba66908d 100644
--- a/Envoy.blade.php
+++ b/Envoy.blade.php
@@ -41,6 +41,7 @@
clone_repository_dev
run_composer_dev
update_symlinks_dev
+ remove_old_release_dev
@endstory
@story('deploy_227')
@@ -160,6 +161,11 @@
@endtask
+@task('remove_old_release_dev')
+ cd {{ $releases_dir_dev@ }}
+ rm -fr $(ls -t1 | tail -n +3)
+@endtask
+
@task('clone_repository_227')
echo 'Cloning repository'
[ -d {{ $releases_dir_227 }} ] || mkdir {{ $releases_dir_227 }}
diff --git a/tests/Feature/AdminTest.php b/tests/Feature/AdminTest.php
index bd8e499d..ae68668d 100644
--- a/tests/Feature/AdminTest.php
+++ b/tests/Feature/AdminTest.php
@@ -19,7 +19,7 @@ class AdminTest extends TestCase
$urls = [
'admin',
- 'admin/calendar',
+ 'admin/schedule',
'admin/message',
'admin/message/add',
'admin/inventory',
diff --git a/tests/Feature/ECCTest.php b/tests/Feature/ECCTest.php
deleted file mode 100644
index 4eae8ddd..00000000
--- a/tests/Feature/ECCTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
-get($url);
- if((int)$response->status() === 404){
- echo $appURL . $url . ' (FAILED) return a 404.';
- $this->assertTrue(false);
- } else {
- echo $appURL . $url . ' (SUCCESS)';
- $this->assertTrue(true);
- }
- echo PHP_EOL;
- }
-
- foreach ($urls as $url) {
- $response = $this->get($url);
- if((int)$response->status() === 500){
- echo $appURL . $url . ' (FAILED) return a 500.';
- $this->assertTrue(false);
- } else {
- echo $appURL . $url . ' (SUCCESS)';
- $this->assertTrue(true);
- }
- echo PHP_EOL;
- }
- }
-}
From 542895c11c959cb89a68039ef337d432fa5e8d23 Mon Sep 17 00:00:00 2001
From: "George Frederick \"Buzz\" Beurling"
Date: Sun, 21 Jun 2020 12:22:14 -0400
Subject: [PATCH 3/4] Update CI/CD MySQL Password
---
.gitlab-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3d3fbaa..49f2bcce 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,8 +4,8 @@ services:
- mysql:5.7
variables:
- MYSQL_DATABASE: homestead
- MYSQL_ROOT_PASSWORD: secret
+ MYSQL_DATABASE: ddb
+ MYSQL_ROOT_PASSWORD: password
DB_HOST: mysql
DB_USERNAME: root
From 9c9ad71a49faa23fc53f5fb1a9f9dc241ce2377a Mon Sep 17 00:00:00 2001
From: "George Frederick \"Buzz\" Beurling"
Date: Sun, 21 Jun 2020 12:30:56 -0400
Subject: [PATCH 4/4] Update CI/CD Test Script
---
.gitlab-ci.yml | 1 +
.phpunit.result.cache | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 49f2bcce..ef3a80fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,6 +21,7 @@ unit_test:
- composer install
- php artisan key:generate
- php artisan migrate
+ - php artisan db:seed
- vendor/bin/phpunit
build:
diff --git a/.phpunit.result.cache b/.phpunit.result.cache
index c6c092d1..e409258f 100644
--- a/.phpunit.result.cache
+++ b/.phpunit.result.cache
@@ -1 +1 @@
-C:37:"PHPUnit\Runner\DefaultTestResultCache":272:{a:2:{s:7:"defects";a:2:{s:32:"Tests\Feature\AdminTest::testUrl";i:3;s:30:"Tests\Feature\ECCTest::testUrl";i:3;}s:5:"times";a:3:{s:32:"Tests\Feature\AdminTest::testUrl";d:0.098;s:30:"Tests\Feature\ECCTest::testUrl";d:0.014;s:33:"Tests\Feature\PublicTest::testUrl";d:0.03;}}}
\ No newline at end of file
+C:37:"PHPUnit\Runner\DefaultTestResultCache":273:{a:2:{s:7:"defects";a:2:{s:32:"Tests\Feature\AdminTest::testUrl";i:3;s:30:"Tests\Feature\ECCTest::testUrl";i:3;}s:5:"times";a:3:{s:32:"Tests\Feature\AdminTest::testUrl";d:0.099;s:30:"Tests\Feature\ECCTest::testUrl";d:0.014;s:33:"Tests\Feature\PublicTest::testUrl";d:0.031;}}}
\ No newline at end of file
+
@endsection
From 4539470537cfd2d359cbbe1e749b2cd721e5dcb4 Mon Sep 17 00:00:00 2001
From: "George Frederick \"Buzz\" Beurling"
+
+
+
+
- Retour
+
-
+
{{ $new->title }}
+- {!! $new->body !!} -
- {{ \App\User::find($new->user_id)->fullname()}}, {{ $new->created_at }} -
- @if($new->tags != [])
- @foreach($new->tags as $tag)
- @if($tag == "Important")
- {{$tag}}
- @else
- {{$tag}}
- @endif
+
+ Retour
+
+ @foreach ($new->pictures as $picture)
+
@endforeach
- @endif
-
-
- @foreach($new->files as $file)
-
+ {{$file}}
- @endforeach
+ + {!! $new->body !!} +
+ {{ \App\User::find($new->user_id)->fullname()}}, {{ $new->created_at }} +
+ @if($new->tags != [])
+ @foreach($new->tags as $tag)
+ @if($tag == "Important")
+ {{$tag}}
+ @else
+ {{$tag}}
+ @endif
+ @endforeach
+ @endif
+ @if($new->files != [""] && isset($new->files))
+ Fichier joint
+ @endif
+
+
+ @if($new->files != [""] && isset($new->files))
+ @foreach($new->files as $file)
+
{{$file}}
+ @endforeach
+ @endif
+