Skip to content

Commit d240d49

Browse files
committed
Add check commands to justfile
1 parent 180c605 commit d240d49

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

flake.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@
118118
];
119119
nativeCheckInputs = [
120120
jq
121+
just
121122
phpPackages.composer
122123
];
123124

124125
doCheck = true;
126+
dontUseJustInstall = true;
125127

126128
buildPhase = ''
127129
mkdir -p $out
@@ -133,10 +135,7 @@
133135
cd "$PLUGIN_DIR"
134136
cp -a "${composerVendor}/vendor" .
135137
cp -r --no-preserve=mode "$src"/* .
136-
composer lint
137-
composer phpcs
138-
# Run directly because composer swallows the exit code
139-
php vendor/bin/rector --debug --dry-run
138+
just _check_no_test
140139
'';
141140
};
142141
in

justfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ build:
2020
build-wp-org:
2121
nix build .#pluginWpOrg
2222

23+
# Run tests and other checks
24+
check: _check_no_test test
25+
26+
_check_no_test: _lint _validate _phpcs
27+
php ./vendor/bin/rector --debug --dry-run
28+
2329
# Run development server
2430
[working-directory('dev')]
2531
dev CLEAN="false":
@@ -34,6 +40,9 @@ format: && _format-php
3440
_format-php:
3541
just _phpcbf || true && just _phpcs
3642

43+
_lint:
44+
php ./vendor/bin/parallel-lint src
45+
3746
_phpcbf:
3847
php ./vendor/bin/phpcbf -d memory_limit=512M --standard=./phpcs.xml --extensions=php src *.php || true
3948

0 commit comments

Comments
 (0)