Skip to content

Commit 76397d0

Browse files
committed
fix: add yalc fallback to ensure plugin is installed in CI
Add check after yalc-add to verify plugin was linked successfully. If yalc failed (not uncommon with certain Node versions), automatically fall back to using file:.. link so plugin is still available for tests. This prevents 'plugin not installed' errors when yalc silently fails.
1 parent b14926f commit 76397d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ jobs:
4040
run: yarn build
4141
- name: Add yalc package to the playground
4242
run: yarn playground:yalc-add
43+
- name: Ensure plugin is available (fallback if yalc failed)
44+
run: |
45+
cd playground
46+
if [ ! -d ".yalc/strapi-plugin-config-sync" ]; then
47+
echo "Yalc link failed, using file link as fallback"
48+
sed -i 's|"strapi-plugin-config-sync": "link:.yalc/strapi-plugin-config-sync"|"strapi-plugin-config-sync": "file:.."|' package.json
49+
fi
4350
- name: Install dependencies playground
4451
run: cd playground && yarn install --unsafe-perm
4552
- name: Build playground

0 commit comments

Comments
 (0)