mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-12322] Migrate to pnpm
This commit is contained in:
@@ -20,7 +20,6 @@ runs:
|
||||
CWD=`pwd`
|
||||
cd ../alfresco-ng2-components
|
||||
if [ -f "pnpm-lock.yaml" ]; then
|
||||
corepack enable pnpm
|
||||
pnpm add @angular/material
|
||||
else
|
||||
npm install @angular/material
|
||||
|
||||
@@ -6,4 +6,4 @@ runs:
|
||||
steps:
|
||||
- name: Check content UP
|
||||
shell: bash
|
||||
run: npm run ci:check-env || exit 1
|
||||
run: pnpm run ci:check-env || exit 1
|
||||
|
||||
@@ -37,8 +37,8 @@ runs:
|
||||
- name: Install dependencies and build project
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build.release
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build.release
|
||||
|
||||
- name: Build and push multi-platform image
|
||||
uses: docker/build-push-action@v7
|
||||
|
||||
@@ -27,8 +27,8 @@ runs:
|
||||
- name: Build Libraries
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run ci:build:many
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run ci:build:many
|
||||
|
||||
- uses: actions/setup-node@v7
|
||||
name: setup GH registry
|
||||
|
||||
@@ -41,7 +41,7 @@ runs:
|
||||
run: |
|
||||
# Only start local server if using localhost
|
||||
if [[ "${PLAYWRIGHT_E2E_HOST}" == "http://localhost"* ]]; then
|
||||
npm start > /dev/null &
|
||||
pnpm start > /dev/null &
|
||||
fi
|
||||
|
||||
printf "Waiting for the application to be ready..."
|
||||
@@ -53,7 +53,7 @@ runs:
|
||||
|
||||
for attempt in $(seq 1 "${SUITE_ATTEMPTS:-1}"); do
|
||||
echo "Running playwright tests with options $OPTIONS on browser ${PLAYWRIGHT_BROWSER} (suite attempt $attempt/${SUITE_ATTEMPTS:-1})"
|
||||
if E2E_TARGET=$OPTIONS npm run ci:e2e; then
|
||||
if E2E_TARGET=$OPTIONS pnpm run ci:e2e; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -lt "${SUITE_ATTEMPTS:-1}" ]; then
|
||||
|
||||
@@ -50,8 +50,10 @@ runs:
|
||||
fi
|
||||
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271
|
||||
- name: node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
cache: 'pnpm'
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- run: npm ci
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: upload npm logs
|
||||
uses: actions/upload-artifact@v7
|
||||
@@ -45,11 +45,11 @@ jobs:
|
||||
|
||||
- name: lint affected
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: npm run affected:lint -- --base=origin/develop
|
||||
run: pnpm run affected:lint -- --base=origin/develop
|
||||
- name: lint all
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: npm run ci:lint
|
||||
- run: npm run stylelint
|
||||
run: pnpm run ci:lint
|
||||
- run: pnpm run stylelint
|
||||
|
||||
detect-e2e-only-changes:
|
||||
name: 'Validate / Detect E2E Only Changes'
|
||||
@@ -89,15 +89,15 @@ jobs:
|
||||
fetch-depth: 2
|
||||
|
||||
- uses: ./.github/actions/before-install
|
||||
- run: npm ci
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: upload npm logs
|
||||
uses: actions/upload-artifact@v7
|
||||
if: failure()
|
||||
with:
|
||||
name: npm-logs
|
||||
path: /home/runner/.npm/_logs/
|
||||
- run: npm run ci:build -- aca-playwright-shared
|
||||
- run: npm run build -- $BUILD_OPTS
|
||||
- run: pnpm run ci:build -- aca-playwright-shared
|
||||
- run: pnpm run build -- $BUILD_OPTS
|
||||
|
||||
- name: dist cache
|
||||
if: ${{ success() }}
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/before-install
|
||||
- run: npm ci
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: upload npm logs
|
||||
uses: actions/upload-artifact@v7
|
||||
if: failure()
|
||||
@@ -127,11 +127,11 @@ jobs:
|
||||
|
||||
- name: Test
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
||||
run: pnpm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
||||
|
||||
- name: Test all
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: npm run ci:test -- $TEST_OPTS
|
||||
run: pnpm run ci:test -- $TEST_OPTS
|
||||
|
||||
e2es-playwright:
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip-e2e') }}
|
||||
@@ -219,7 +219,7 @@ jobs:
|
||||
uses: ./.github/actions/before-install
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Restore dist cache
|
||||
uses: actions/cache/restore@v6
|
||||
@@ -233,12 +233,12 @@ jobs:
|
||||
|
||||
- name: Check Search Indexing
|
||||
continue-on-error: true
|
||||
run: npm run ci:check-search-indexing
|
||||
run: pnpm run ci:check-search-indexing
|
||||
env:
|
||||
ADMIN_PASSWORD_SCRIPT: ${{ env.ADMIN_PASSWORD }}
|
||||
|
||||
- name: Before playwright
|
||||
run: npm run ci:playwright:install
|
||||
run: pnpm run ci:playwright:install
|
||||
|
||||
- name: Run e2e playwright
|
||||
uses: ./.github/actions/run-e2e-playwright
|
||||
|
||||
@@ -61,9 +61,9 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: ./.github/actions/setup
|
||||
- run: npm ci
|
||||
- run: npm run affected:lint -- --base=origin/develop
|
||||
- run: npm run stylelint
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm run affected:lint -- --base=origin/develop
|
||||
- run: pnpm run stylelint
|
||||
|
||||
unit-tests:
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
@@ -83,8 +83,8 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: ./.github/actions/before-install
|
||||
- run: npm ci
|
||||
- run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
||||
|
||||
publish-docker-registry:
|
||||
if: ${{ always() }}
|
||||
|
||||
@@ -38,15 +38,17 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271
|
||||
- name: node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
cache: 'pnpm'
|
||||
- uses: ./.github/actions/before-install
|
||||
- run: npm ci
|
||||
- run: npm run ci:build -- aca-playwright-shared
|
||||
- run: npm run build -- $BUILD_OPTS
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm run ci:build -- aca-playwright-shared
|
||||
- run: pnpm run build -- $BUILD_OPTS
|
||||
|
||||
- name: dist cache
|
||||
if: ${{ success() }}
|
||||
@@ -117,10 +119,10 @@ jobs:
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
cache: 'pnpm'
|
||||
|
||||
- uses: ./.github/actions/before-install
|
||||
- run: npm ci
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- uses: actions/cache/restore@v6
|
||||
id: cache
|
||||
@@ -132,7 +134,7 @@ jobs:
|
||||
uses: ./.github/actions/before-e2e
|
||||
|
||||
- name: Before playwright
|
||||
run: npm run ci:playwright:install
|
||||
run: pnpm run ci:playwright:install
|
||||
|
||||
- uses: ./.github/actions/run-e2e-playwright
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Supply Chain Review - PR Instructions
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
paths:
|
||||
- "package.json"
|
||||
- "pnpm-lock.yaml"
|
||||
- "**/package.json"
|
||||
|
||||
jobs:
|
||||
instructions:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/github-upsert-comment@44f603af32dc79129056a9e4246ab62f35987a2b # v18.21.1
|
||||
with:
|
||||
comment-identifier: supply-chain-review-instructions
|
||||
comment-body: |
|
||||
## 🔒 Supply Chain Security
|
||||
|
||||
This PR modifies dependencies. To run a security analysis, comment:
|
||||
|
||||
```
|
||||
/supply-chain-review
|
||||
```
|
||||
|
||||
The analysis will check for vulnerabilities, typosquatting, maintainer takeovers, and other supply chain risks.
|
||||
File diff suppressed because one or more lines are too long
@@ -120,11 +120,11 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: setup NPM
|
||||
- name: setup PNPM
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
cache: 'pnpm'
|
||||
- name: Migration
|
||||
shell: bash
|
||||
env:
|
||||
@@ -182,4 +182,4 @@ jobs:
|
||||
body: Automatic PR
|
||||
add-paths: |
|
||||
package.json
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
|
||||
Reference in New Issue
Block a user