From 8852182fc860e5c2162fd6ad4baccacff77cc028 Mon Sep 17 00:00:00 2001 From: adewar Date: Wed, 29 Jan 2025 10:05:20 -0700 Subject: [PATCH] Update stop server script, trying cacheing playerwright browsers --- .github/workflows/content-sources-actions.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/content-sources-actions.yml b/.github/workflows/content-sources-actions.yml index 53ae07d72..cba401314 100644 --- a/.github/workflows/content-sources-actions.yml +++ b/.github/workflows/content-sources-actions.yml @@ -171,6 +171,15 @@ jobs: working-directory: content-sources-frontend run: yarn install + - name: Cache Playwright browsers + id: cache-playwright-browsers + uses: actions/cache@v3 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-playwright- + - name: Install front-end Playwright Browsers working-directory: content-sources-frontend run: yarn playwright install --with-deps @@ -198,8 +207,13 @@ jobs: working-directory: content-sources-frontend if: always() # Ensures this step runs even if previous steps fail run: | - ps aux | grep 'yarn start:stage' | grep -v grep | awk '{print $2}' | xargs kill -9 - + PIDS=$(ps aux | grep 'yarn start:stage' | grep -v grep | awk '{print $2}') + echo "PIDs to kill: $PIDS" + if [ -n "$PIDS" ]; then + kill -9 $PIDS + else + echo "No PIDs found to kill" + fi # - name: Run front-end Playwright tests # working-directory: content-sources-frontend # run: yarn playwright test