mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ci:force] - Fixed cache hit for npmn
This commit is contained in:
@@ -1,11 +1,6 @@
|
|||||||
name: 'Setup'
|
name: 'Setup'
|
||||||
description: 'Initialize cache, env var load'
|
description: 'Initialize cache, env var load'
|
||||||
inputs:
|
inputs:
|
||||||
enable-node-modules-cache:
|
|
||||||
description: 'enable caching for node modules'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: 'true'
|
|
||||||
cache-suffix:
|
cache-suffix:
|
||||||
description: 'Suffix to make Nx cache key unique per job (e.g. matrix project name)'
|
description: 'Suffix to make Nx cache key unique per job (e.g. matrix project name)'
|
||||||
required: false
|
required: false
|
||||||
@@ -24,9 +19,6 @@ outputs:
|
|||||||
npm-tag:
|
npm-tag:
|
||||||
description: 'NPM tag'
|
description: 'NPM tag'
|
||||||
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
|
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
|
||||||
node-modules-cache-hit:
|
|
||||||
description: 'Whether node_modules cache was hit'
|
|
||||||
value: ${{ steps.node-modules-cache.outputs.cache-hit }}
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@@ -48,19 +40,9 @@ runs:
|
|||||||
if: ${{ inputs.full-setup == 'true' }}
|
if: ${{ inputs.full-setup == 'true' }}
|
||||||
id: set-npm-tag
|
id: set-npm-tag
|
||||||
uses: ./.github/actions/set-npm-tag
|
uses: ./.github/actions/set-npm-tag
|
||||||
- name: Get pnpm store directory
|
- name: Install dependencies
|
||||||
id: pnpm-cache
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
run: pnpm install --frozen-lockfile
|
||||||
- name: Cache pnpm store
|
|
||||||
id: node-modules-cache
|
|
||||||
if: ${{ inputs.enable-node-modules-cache == 'true' }}
|
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
- name: Restore nx cache
|
- name: Restore nx cache
|
||||||
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-suffix: build
|
cache-suffix: build
|
||||||
full-setup: 'false'
|
full-setup: 'false'
|
||||||
- name: Install dependencies
|
|
||||||
if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }}
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Build affected libs
|
- name: Build affected libs
|
||||||
env:
|
env:
|
||||||
BASE_REF: ${{ inputs.base_ref }}
|
BASE_REF: ${{ inputs.base_ref }}
|
||||||
|
|||||||
@@ -180,9 +180,6 @@ jobs:
|
|||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
cache-suffix: setup
|
cache-suffix: setup
|
||||||
- name: Install dependencies
|
|
||||||
if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }}
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Bundle
|
- name: Bundle
|
||||||
run: |
|
run: |
|
||||||
pnpm run bundle:js-api
|
pnpm run bundle:js-api
|
||||||
@@ -209,9 +206,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-suffix: lint
|
cache-suffix: lint
|
||||||
full-setup: 'false'
|
full-setup: 'false'
|
||||||
- name: Install dependencies
|
|
||||||
if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }}
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Run lint
|
- name: Run lint
|
||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref || 'develop' }}
|
BASE_REF: ${{ github.base_ref || 'develop' }}
|
||||||
@@ -245,9 +239,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-suffix: storybook
|
cache-suffix: storybook
|
||||||
full-setup: 'false'
|
full-setup: 'false'
|
||||||
- name: Install dependencies
|
|
||||||
if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }}
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Build Storybook
|
- name: Build Storybook
|
||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref || 'develop' }}
|
BASE_REF: ${{ github.base_ref || 'develop' }}
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ jobs:
|
|||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
cache-suffix: test-matrix
|
cache-suffix: test-matrix
|
||||||
- name: Install dependencies
|
|
||||||
if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }}
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Generate affected projects matrix
|
- name: Generate affected projects matrix
|
||||||
id: set-matrix
|
id: set-matrix
|
||||||
env:
|
env:
|
||||||
@@ -72,9 +69,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-suffix: test-${{ matrix.project }}
|
cache-suffix: test-${{ matrix.project }}
|
||||||
full-setup: 'false'
|
full-setup: 'false'
|
||||||
- name: Install dependencies
|
|
||||||
if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }}
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
- name: Run unit tests for ${{ matrix.project }}
|
- name: Run unit tests for ${{ matrix.project }}
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
|
|||||||
Reference in New Issue
Block a user