mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[AAE-32905] - check with adding cache
This commit is contained in:
7
.github/workflows/build-lib-workflow.yml
vendored
7
.github/workflows/build-lib-workflow.yml
vendored
@@ -19,6 +19,13 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-modules-
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
- name: Run build for ${{ matrix.project }}
|
- name: Run build for ${{ matrix.project }}
|
||||||
|
25
.github/workflows/pull-request.yml
vendored
25
.github/workflows/pull-request.yml
vendored
@@ -195,6 +195,13 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-modules-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Generate affected projects matrix
|
- name: Generate affected projects matrix
|
||||||
@@ -202,7 +209,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
BASE_REF="${{ github.event.pull_request.base.ref }}"
|
BASE_REF="${{ github.event.pull_request.base.ref }}"
|
||||||
echo "Base ref is $BASE_REF"
|
echo "Base ref is $BASE_REF"
|
||||||
AFFECTED=$(npx nx show projects --affected --target=test --base=origin/$BASE_REF --select=projects --plain --exclude=cli,stories,eslint-angular)
|
AFFECTED=$(npx nx show projects --affected --target=test --base=origin/$BASE_REF --select=projects --plain)
|
||||||
echo "Affected projects: $AFFECTED"
|
echo "Affected projects: $AFFECTED"
|
||||||
MATRIX_JSON=$(echo $AFFECTED | xargs -n1 | jq -R -s -c 'split("\n")[:-1] | map({ "project": . })')
|
MATRIX_JSON=$(echo $AFFECTED | xargs -n1 | jq -R -s -c 'split("\n")[:-1] | map({ "project": . })')
|
||||||
MATRIX_JSON=$(echo "$MATRIX_JSON" | tr -d '\n' | sed 's/"$//')
|
MATRIX_JSON=$(echo "$MATRIX_JSON" | tr -d '\n' | sed 's/"$//')
|
||||||
@@ -220,13 +227,20 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for all tags and branches
|
fetch-depth: 0 # Fetch all history for all tags and branches
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-modules-
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
- run: npx nx affected --target=lint
|
- run: npx nx affected --target=lint
|
||||||
|
|
||||||
trigger-build:
|
trigger-build:
|
||||||
name: "Build Libs"
|
name: "Build Libs"
|
||||||
needs: [generate-affected-matrix]
|
needs: [generate-affected-matrix]
|
||||||
uses: ./.github/workflows/unit-test-workflow.yml
|
uses: ./.github/workflows/build-lib-workflow.yml
|
||||||
with:
|
with:
|
||||||
matrix: ${{ needs.generate-affected-matrix.outputs.matrix }}
|
matrix: ${{ needs.generate-affected-matrix.outputs.matrix }}
|
||||||
|
|
||||||
@@ -239,6 +253,13 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-modules-
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
- name: Build Storybook
|
- name: Build Storybook
|
||||||
|
7
.github/workflows/unit-test-workflow.yml
vendored
7
.github/workflows/unit-test-workflow.yml
vendored
@@ -19,6 +19,13 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-modules-
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
- name: Run unit tests for ${{ matrix.project }}
|
- name: Run unit tests for ${{ matrix.project }}
|
||||||
|
Reference in New Issue
Block a user