Skip to content

Commit eadab02

Browse files
committed
Update CI Test and GitLab CI files
1 parent da40ae4 commit eadab02

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

Diff for: .gitlab-ci.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
---
2-
image: natanfelles/php-base
2+
image: registry.gitlab.com/aplus-framework/images/base
3+
4+
include:
5+
- template: Security/SAST.gitlab-ci.yml
6+
7+
variables:
8+
SAST_EXCLUDED_PATHS: guide, tests, vendor
39

410
test:php:
511
stage: test
@@ -10,7 +16,7 @@ test:php:
1016
before_script:
1117
- composer install
1218
script:
13-
- composer normalize --dry-run --indent-size=1 --indent-style=tab
19+
- composer normalize --dry-run --indent-size=4 --indent-style=space
1420
- vendor/bin/php-cs-fixer fix --diff --dry-run --verbose
1521
- vendor/bin/phpmd src xml phpmd.xml
1622
- vendor/bin/phpstan analyse -vvv
@@ -28,12 +34,11 @@ pages:
2834
- test:php
2935
environment:
3036
name: production
31-
url: https://the-framework.gitlab.io
37+
url: https://aplus-framework.gitlab.io
3238
script:
3339
- mkdir public/
3440
- mv build/coverage/ public/
3541
- mv build/docs/ public/
36-
- curl -sS https://the-framework.gitlab.io/redirect.php | php
3742
artifacts:
3843
paths:
3944
- public/

Diff for: ci-test.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
set -e
33

44
commands=(
5-
"composer install"
6-
"composer normalize --dry-run --indent-size=1 --indent-style=tab"
7-
"vendor/bin/php-cs-fixer fix --diff --dry-run --verbose"
8-
"vendor/bin/phpmd src xml phpmd.xml"
9-
"vendor/bin/phpstan analyse -vvv"
10-
"vendor/bin/phpunit"
11-
"phpdoc"
5+
"composer install"
6+
"composer normalize --dry-run --indent-size=4 --indent-style=space"
7+
"vendor/bin/php-cs-fixer fix --diff --dry-run --verbose"
8+
"vendor/bin/phpmd src xml phpmd.xml"
9+
"vendor/bin/phpstan analyse -vvv"
10+
"vendor/bin/phpunit"
11+
"phpdoc"
1212
)
1313

1414
color_default='\033[0m'
1515
color_green='\033[1;32m'
1616
color_red='\033[1;31m'
1717

1818
for command in "${commands[@]}"; do
19-
echo -e "${color_green}$ ${command}${color_default}"
20-
if ! eval "${command}"; then
21-
echo -e "${color_red}ERROR: Test failed${color_default}"
22-
exit
23-
fi
19+
echo -e "${color_green}$ ${command}${color_default}"
20+
if ! eval "${command}"; then
21+
echo -e "${color_red}ERROR: Test failed${color_default}"
22+
exit
23+
fi
2424
done
2525

2626
echo

0 commit comments

Comments
 (0)