-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.sh
executable file
·34 lines (30 loc) · 1.05 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# CI testing.
#
set -e
echo ""
echo ""
echo "Starting tests!"
echo ""
echo ""
echo " => Building version 2 for php 7"
docker build --progress=plain -f="Dockerfile2" -t local-dcycle-php-lint-image .
echo " => Running the help command (smoke test)"
docker run --rm local-dcycle-php-lint-image --help
echo " => Testing with Drupal"
docker run --rm -v "$(pwd)/example01":/code local-dcycle-php-lint-image --standard=Drupal /code
echo " => Expecting this to fail"
! docker run --rm -v "$(pwd)/example02":/code local-dcycle-php-lint-image --standard=Drupal /code
echo " => Building version 3 for php 8"
docker build --progress=plain -f="Dockerfile3" -t local-dcycle-php-lint-image .
echo " => Running the help command (smoke test)"
docker run --rm local-dcycle-php-lint-image --help
echo " => Testing with Drupal"
docker run --rm -v "$(pwd)/example01":/code local-dcycle-php-lint-image --standard=Drupal /code
! docker run --rm -v "$(pwd)/example02":/code local-dcycle-php-lint-image --standard=Drupal /code
echo ""
echo ""
echo "All done with tests!"
echo ""
echo ""