mirror of
https://github.com/opdavies/build-configs.git
synced 2025-03-11 05:11:51 +00:00
Add a `phpunit` recipe for running PHPUnit tests, with a `test` alias that could later be used for running Pest in PHP projects or Jest in a node project.
57 lines
1.1 KiB
Twig
57 lines
1.1 KiB
Twig
# {{ managedText | raw }}
|
|
|
|
default:
|
|
@just --list
|
|
|
|
{% if "php" is same as language %}
|
|
composer *args:
|
|
{{ "just _exec php composer {{ args }}" | raw }}
|
|
|
|
alias phpunit := test
|
|
|
|
test *args:
|
|
{{ "just _run phpunit {{ args }}" | raw }}
|
|
{% endif %}
|
|
|
|
{% if "drupal-project" is same as type %}
|
|
drush *args:
|
|
{{ "just _exec php drush {{ args }}" | raw }}
|
|
|
|
install *args:
|
|
{{ "just _exec php drush site:install -y {{ args }}" | raw }}
|
|
{% endif %}
|
|
|
|
{% if "node" is same as language %}
|
|
yarn *args:
|
|
{{ "just _exec node yarn {{ args }}" | raw }}
|
|
{% endif %}
|
|
|
|
{% if "fractal" is same as type %}
|
|
fractal *args:
|
|
{{ "just yarn fractal {{ args }}" | raw }}
|
|
|
|
clean:
|
|
rm -fr build
|
|
|
|
build *args:
|
|
just fractal build {{ args }}
|
|
|
|
sync: clean build
|
|
#!/usr/bin/env bash
|
|
set -eux
|
|
aws s3 sync "build/." s3://"${BUCKET_NAME}" \
|
|
--acl "public-read" \
|
|
--cache-control max-age=3600
|
|
{% endif %}
|
|
|
|
{% if "laravel" is same as type %}
|
|
artisan *args:
|
|
{{ "just _run artisan {{ args }}" | raw }}
|
|
{% endif %}
|
|
|
|
_exec +args:
|
|
{{ "docker compose exec {{ args }}" | raw }}
|
|
|
|
_run command *args:
|
|
{{ "docker compose run --rm --no-deps --entrypoint {{ command }} --tty php {{ args }}" | raw }}
|