From aeb4077adc9601c896e8f1c4a92ae36f0746c697 Mon Sep 17 00:00:00 2001 From: resonic-user Date: Tue, 17 Jun 2025 16:39:34 +0000 Subject: [PATCH] v --- .github/workflows/cache-verify.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cache-verify.yml b/.github/workflows/cache-verify.yml index 77e88d858..f8d4ca04f 100644 --- a/.github/workflows/cache-verify.yml +++ b/.github/workflows/cache-verify.yml @@ -57,11 +57,14 @@ jobs: run: | BACKEND_HASH=$(sha256sum backend/yarn.lock | cut -d' ' -f1) WEBAPP_HASH=$(sha256sum webapp/yarn.lock | cut -d' ' -f1) - CYPRESS_HASH=$(sha256sum cypress/yarn.lock | cut -d' ' -f1 2>/dev/null || echo "none") + CYPRESS_HASH=$(sha256sum cypress/yarn.lock | cut -d' ' -f1 2>/dev/null || echo "nocypress") KEY="ci-all-cache-${{ runner.os }}-${BACKEND_HASH}-${WEBAPP_HASH}-${CYPRESS_HASH}-run${{ github.run_id }}" echo "key=$KEY" echo "key=$KEY" >> $GITHUB_OUTPUT + - name: Ensure directory structure + run: mkdir -p backend webapp cypress + - name: Restore CI cache id: restore-cache uses: actions/cache/restore@v4 @@ -88,10 +91,19 @@ jobs: cd webapp && yarn install fi - - name: Install Cypress dependencies locally + - name: Install Cypress (local in cypress/) run: | - if [ ! -d cypress/node_modules ] || [ -z "$(ls -A cypress/node_modules)" ]; then - cd cypress && yarn install + if [ -f cypress/package.json ]; then + cd cypress + if [ ! -d node_modules ] || [ -z "$(ls -A node_modules)" ]; then + echo "Installing Cypress locally in cypress/" + yarn install + npx --yes cypress verify + else + echo "✅ cypress/node_modules already present." + fi + else + echo "⚠️ No cypress/package.json found — skipping local Cypress install" fi - name: Install cucumber-json-formatter if missing