Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ jobs:
echo "Tooling changed or no specific plugin diff; testing all plugins."
echo "slugs=" >> "$GITHUB_OUTPUT"
else
echo "Changed plugins:"; printf ' - %s\n' $changed_plugins
echo "slugs=$(printf '%s ' $changed_plugins)" >> "$GITHUB_OUTPUT"
echo "Changed plugins:"
while IFS= read -r slug; do
[ -z "$slug" ] || printf ' - %s\n' "$slug"
done <<< "$changed_plugins"
printf 'slugs=%s\n' "$(printf '%s ' "$changed_plugins")" >> "$GITHUB_OUTPUT"
fi

- name: Run plugin tests
working-directory: plugins-repo
env:
VITO_PATH: ${{ github.workspace }}/vito
run: node scripts/test.mjs ${{ steps.changed.outputs.slugs }}
PLUGIN_SLUGS: ${{ steps.changed.outputs.slugs }}
run: node scripts/test.mjs
2 changes: 1 addition & 1 deletion scripts/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import {
const TESTS_DIRNAME = "tests";

function parseArgs(argv) {
const slugs = [];
const slugs = (process.env.PLUGIN_SLUGS ?? "").split(/\s+/).filter(Boolean);
let vito = process.env.VITO_PATH ?? path.resolve(pluginsDir, "..", "..", "vito");
let filter = null;
for (let i = 0; i < argv.length; i += 1) {
Expand Down