mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10100][Security] Remove npx usage from CI/CD and shell scripts to mitigate supply chain risks (#4795)
This commit is contained in:
@@ -6,4 +6,4 @@ runs:
|
||||
steps:
|
||||
- name: Check content UP
|
||||
shell: bash
|
||||
run: ./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --host $BASE_URL -u $ADMIN_EMAIL -p $ADMIN_PASSWORD || exit 1
|
||||
run: npm run ci:check-env || exit 1
|
||||
|
||||
@@ -29,7 +29,9 @@ runs:
|
||||
|
||||
- name: Build Libraries
|
||||
shell: bash
|
||||
run: npm ci && npx nx run-many --target=build
|
||||
run: |
|
||||
npm ci
|
||||
npm run ci:build:many
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
name: setup GH registry
|
||||
|
||||
@@ -30,4 +30,4 @@ runs:
|
||||
printf "\nApplication is ready.\n"
|
||||
|
||||
echo "Running playwright tests with options ${{ inputs.options }}"
|
||||
npx nx run ${{ inputs.options }}-e2e:e2e
|
||||
E2E_TARGET=${{ inputs.options }} npm run ci:e2e
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
run: npm run affected:lint -- --base=origin/develop
|
||||
- name: lint all
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: npx nx run-many --target=lint
|
||||
run: npm run ci:lint
|
||||
- run: npm run stylelint
|
||||
|
||||
build:
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
with:
|
||||
name: npm-logs
|
||||
path: /home/runner/.npm/_logs/
|
||||
- run: npx nx build aca-playwright-shared
|
||||
- run: npm run ci:build -- aca-playwright-shared
|
||||
- run: npm run build -- $BUILD_OPTS
|
||||
|
||||
- name: dist cache
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
|
||||
- name: Test all
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS
|
||||
run: npm run ci:test -- $TEST_OPTS
|
||||
|
||||
e2es-playwright:
|
||||
needs: [lint, build, unit-tests]
|
||||
@@ -203,8 +203,7 @@ jobs:
|
||||
uses: ./.github/actions/before-e2e
|
||||
|
||||
- name: Before playwright
|
||||
shell: bash
|
||||
run: npx playwright install chromium
|
||||
run: npm run ci:playwright:install
|
||||
|
||||
- uses: ./.github/actions/run-e2e-playwright
|
||||
with:
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
cache: 'npm'
|
||||
- uses: ./.github/actions/before-install
|
||||
- run: npm ci
|
||||
- run: npx nx build aca-playwright-shared
|
||||
- run: npm run ci:build -- aca-playwright-shared
|
||||
- run: npm run build -- $BUILD_OPTS
|
||||
|
||||
- name: dist cache
|
||||
@@ -128,12 +128,12 @@ jobs:
|
||||
uses: ./.github/actions/before-e2e
|
||||
|
||||
- name: Before playwright
|
||||
shell: bash
|
||||
run: npx playwright install chromium
|
||||
run: npm run ci:playwright:install
|
||||
|
||||
- uses: ./.github/actions/run-e2e-playwright
|
||||
with:
|
||||
options: "${{ matrix.e2e-suites.name }}"
|
||||
artifact-name: ${{ matrix.e2e-suites.name }}
|
||||
test-runner: playwright
|
||||
|
||||
- uses: ./.github/actions/after-e2e
|
||||
|
||||
Reference in New Issue
Block a user