From 8064a843e8c357fbbe1c330c0fce1ff683741ff7 Mon Sep 17 00:00:00 2001 From: mulahasanovic Date: Fri, 12 Dec 2025 17:31:57 +0100 Subject: [PATCH] fix(build): install cypress binary and cache only in relevant pipeline --- .github/workflows/build-unit-tests.yml | 8 +++----- .github/workflows/generateDocs.yml | 8 +++----- .github/workflows/npmpublish.yml | 8 +++----- .github/workflows/server-tests.yml | 16 +++++++++++++--- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-unit-tests.yml b/.github/workflows/build-unit-tests.yml index 5cd279d..291ad13 100644 --- a/.github/workflows/build-unit-tests.yml +++ b/.github/workflows/build-unit-tests.yml @@ -21,14 +21,12 @@ jobs: with: node-version: ${{ matrix.node-version }} - # 2. Restore npm and cypress cache manually - - name: Restore npm and cypress cache + # 2. Restore npm cache manually + - name: Restore npm cache uses: actions/cache@v3 id: npm-cache with: - path: | - ~/.npm - ~/.cypress/Cypress + path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- diff --git a/.github/workflows/generateDocs.yml b/.github/workflows/generateDocs.yml index 1edff0f..7371365 100644 --- a/.github/workflows/generateDocs.yml +++ b/.github/workflows/generateDocs.yml @@ -23,14 +23,12 @@ jobs: node-version: ${{ matrix.node-version }} - # 2. Restore npm and cypress cache manually - - name: Restore npm and cypress cache + # 2. Restore npm cache manually + - name: Restore npm cache uses: actions/cache@v3 id: npm-cache with: - path: | - ~/.npm - ~/.cypress/Cypress + path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index f32f2c2..1442df4 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -23,14 +23,12 @@ jobs: with: node-version: ${{ matrix.node-version }} - # 2. Restore npm and cypress cache manually - - name: Restore npm and cypress cache + # 2. Restore npm cache manually + - name: Restore npm cache uses: actions/cache@v3 id: npm-cache with: - path: | - ~/.npm - ~/.cypress/Cypress + path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index a023157..b546c62 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -21,21 +21,31 @@ jobs: with: node-version: ${{ matrix.node-version }} - # 2. Restore npm and cypress cache manually - - name: Restore npm and cypress cache + # 2. Restore npm cache manually + - name: Restore npm cache uses: actions/cache@v3 id: npm-cache with: path: | ~/.npm - ~/.cache/Cypress key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- + - name: Cache Cypress binary + uses: actions/cache@v3 + with: + path: ~/.cache/Cypress + key: cypress-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + cypress-${{ runner.os }}- + - name: Install Dependencies run: npm ci + - name: Install Cypress binary + run: npx cypress install + - name: Install Rimraf run: npm i rimraf