Skip to content

Commit

Permalink
fix scripts for no tty
Browse files Browse the repository at this point in the history
  • Loading branch information
galeaspablo committed Sep 24, 2024
1 parent 6e78cc8 commit 721a6b2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
set -e

echo "Checking dependency tracking for general dependencies"
docker exec -it php-all-services-test "php" "vendor/bin/deptrac" "analyze" "--config-file" "depfile_general.yml"
docker exec -t php-all-services-test "php" "vendor/bin/deptrac" "analyze" "--config-file" "depfile_general.yml"

echo "Checking dependency tracking for bounded contexts"
docker exec -it php-all-services-test "php" "vendor/bin/deptrac" "analyze" "--config-file" "depfile_bounded_context.yml"
docker exec -t php-all-services-test "php" "vendor/bin/deptrac" "analyze" "--config-file" "depfile_bounded_context.yml"

echo "All dependency checks succesful!!!"
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/bash
set -e

if docker exec -it php-all-services-test "php" "vendor/bin/php-cs-fixer" "fix" "--config=.php-cs-fixer.php-highest.php" "--allow-risky=yes" "--dry-run" | grep 'src'; then
echo "Running linter checks"

if docker exec -t php-all-services-test "php" "vendor/bin/php-cs-fixer" "fix" "--config=.php-cs-fixer.php-highest.php" "--allow-risky=yes" "--dry-run" | grep 'src'; then
echo "Styling in ./src failed. To fix run ./dev_linter_fix.sh"
exit 1
else
echo "Styling in ./src passed."
fi
if docker exec -it php-all-services-test "php" "vendor/bin/php-cs-fixer" "fix" "--config=.php-cs-fixer.php-highest.php" "--allow-risky=yes" "--dry-run" | grep 'tests'; then
if docker exec -t php-all-services-test "php" "vendor/bin/php-cs-fixer" "fix" "--config=.php-cs-fixer.php-highest.php" "--allow-risky=yes" "--dry-run" | grep 'tests'; then
echo "Styling in ./tests failed. To fix run ./dev_linter_fix.sh"
exit 1
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

docker exec -it php-all-services-test "php" "vendor/bin/php-cs-fixer" "fix" "--config=.php-cs-fixer.php-highest.php" "--allow-risky=yes"
echo "Running linter fixes"
docker exec -t php-all-services-test "php" "vendor/bin/php-cs-fixer" "fix" "--config=.php-cs-fixer.php-highest.php" "--allow-risky=yes"
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash
set -e

echo "Running tests"

# Allows you to do filters as needed
docker exec -it php-all-services-test "php" "vendor/bin/phpunit" "$@"
docker exec -t php-all-services-test "php" "vendor/bin/phpunit" "$@"

echo "All tests passed!!!"
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -e

echo "PHPStan for /srv/src"
docker exec -it php-all-services-test "php" "vendor/bin/phpstan" "analyse" "--level" "max" "-c" "phpstan.src.neon" "-vvv"
docker exec -t php-all-services-test "php" "vendor/bin/phpstan" "analyse" "--level" "max" "-c" "phpstan.src.neon" "-vvv"

echo "All type checks succesful!!!"

0 comments on commit 721a6b2

Please sign in to comment.