Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Luke081515Bot-Monitoring
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Luke081515
Luke081515Bot-Monitoring
Commits
2504c710
Commit
2504c710
authored
Jul 31, 2017
by
Luke081515
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1-setup-ci' into 'master'
Resolve "Setup CI" Closes
#1
See merge request
!1
parents
76522315
3d004e91
Pipeline
#51
passed with stage
in 39 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
0 deletions
+58
-0
.gitlab-ci.yml
.gitlab-ci.yml
+8
-0
ci/docker_install.sh
ci/docker_install.sh
+18
-0
ci/phplint.sh
ci/phplint.sh
+32
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
2504c710
image
:
php:5.6
before_script
:
-
bash ci/docker_install.sh > /dev/null
test:php-lint:
script
:
-
bash ci/phplint.sh ./
\ No newline at end of file
ci/docker_install.sh
0 → 100644
View file @
2504c710
#!/bin/bash
# We need to install dependencies only for Docker
[[
!
-e
/.dockerenv
]]
&&
exit
0
set
-xe
# Install git (the php image doesn't have it) which is required by composer
apt-get update
-yqq
apt-get
install
git
-yqq
# Install phpunit, the tool that we will use for testing
curl
--location
--output
/usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod
+x /usr/local/bin/phpunit
# Install mysql driver
# Here you can install any other extension that you need
docker-php-ext-install pdo_mysql
\ No newline at end of file
ci/phplint.sh
0 → 100644
View file @
2504c710
#!/bin/bash
#Usage: `phplint.sh /path/to/dir` or `phplint.sh /path/to/file.php`
error
=
false
while
test
$#
-gt
0
;
do
current
=
$1
shift
if
[
!
-d
$current
]
&&
[
!
-f
$current
]
;
then
echo
"Invalid directory or file:
$current
"
error
=
true
continue
fi
for
file
in
`
find
$current
-type
f
-name
"*.php"
`
;
do
RESULTS
=
`
php
-l
$file
`
if
[
"
$RESULTS
"
!=
"No syntax errors detected in
$file
"
]
;
then
echo
$RESULTS
error
=
true
fi
done
done
if
[
"
$error
"
=
true
]
;
then
exit
1
else
exit
0
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment