Skip to content
Snippets Groups Projects
Commit 4cdd0e67 authored by Raul Barreras's avatar Raul Barreras
Browse files

Update t/php-lint/tests.sh, .gitlab-ci.yml files

parent d7af8174
No related branches found
No related tags found
6 merge requests!31Sync 6-add-automated-secrets-detection with Master,!30Master,!29Sync develop with master,!28Sync 6-add-automated-secrets-detection with master,!27Update 7-add-dependency-check to SonarScanner 4.0,!22Resolve "add simple unit tests for containers"
......@@ -27,13 +27,21 @@ Make All Images:
script:
- make
test:
Test Sonar Scanner:
stage: test
tags:
- dockerd
script:
- docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -v
Test PHP Lint:
stage: test
tags:
- linux, dockerd
script:
- t/php-lint/tests.sh
Push to Container Registry:
after_script:
- rm -f /var/lib/gitlab-runner/.docker/config.json
......
......@@ -3,6 +3,12 @@ chmod 777 ${TMP_DIR}
touch "${TMP_DIR}/dumb php file with spaces.php"
touch "${TMP_DIR}/ddumb_php_file_without_spaces.php"
touch "${TMP_DIR}/$(printf '\u03c0').php"
docker run -it --rm -v "${TMP_DIR}:/work" its-registry.unl.edu/unl-its/docker-ci/php-lint:latest php-lint -d /work
echo $?
docker run -it --rm -v "${TMP_DIR}:/work" its-registry.unl.edu/unl-its/docker-ci/php-lint:latest php-lint -d /work > /dev/null 2>&1
RET=$?
rm -rf ${TMP_DIR}
if [ $RET -eq 0 ]; then
echo "PASS";
else
echo "FAIL";
fi
exit $RES
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment