Skip to content

Commit 649d746

Browse files
committed
chore: harden fly deploy workflow
1 parent 79dd263 commit 649d746

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/validate.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
- name: ⬣ Lint
7070
run: npm run lint
7171
working-directory: ./workshop
72+
env:
73+
NODE_OPTIONS: --max-old-space-size=8192
7274

7375
tests:
7476
name: 🧪 Test
@@ -86,6 +88,27 @@ jobs:
8688
- name: 📦 Install dependencies
8789
run: npm ci
8890

91+
- name: 🎭 Install Playwright browser
92+
if: ${{ hashFiles('epicshop/test.js') != '' }}
93+
run: npx playwright install --with-deps chromium
94+
95+
- name: ◭ Generate Prisma clients
96+
if: ${{ hashFiles('epicshop/test.js') != '' }}
97+
run: |
98+
set -euo pipefail
99+
shopt -s globstar nullglob
100+
schemas=(./exercises/**/*.solution.*/prisma/schema.prisma)
101+
if [ "${#schemas[@]}" -eq 0 ]; then
102+
echo "No solution-app Prisma schemas found; skipping Prisma client generation."
103+
exit 0
104+
fi
105+
for schema in "${schemas[@]}"; do
106+
app_dir="${schema%/prisma/schema.prisma}"
107+
echo "::group::prisma generate in ${app_dir}"
108+
(cd "$app_dir" && npx prisma generate)
109+
echo "::endgroup::"
110+
done
111+
89112
# Workshops ship epicshop/test.js (not .ts). `..s` runs solution apps only.
90113
- name: 🧪 Run solution tests
91114
run: |

0 commit comments

Comments
 (0)