Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

CI/CD-NPM_auditbuild scripts #3946

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,23 @@ jobs:
if: matrix.theme == 'fusion'
- name: Run WDIO Tests for form factor ${{ matrix.form-factor }} and ${{ matrix.theme }}
run: SITE=build/${{ matrix.theme }} FORM_FACTOR=${{ matrix.form-factor }} npm run wdio-${{ matrix.theme }}
NPM_Audit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies and run npm audit
run: |
npm i --package-lock-only
npm audit --json > audit.json || true
if [ -s audit.json ]; then
echo 'NPM audit vulnerabilities found:'
npm audit --registry=https://registry.npmjs.org --json > audit-full.json
cat audit-full.json # Display the contents of audit-full.json
else
echo 'No NPM audit vulnerabilities found.'
fi
release-and-deploy:
runs-on: ubuntu-latest

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"wdio-lowlight": "terra wdio --themes clinical-lowlight-theme",
"wdio-fusion": "terra wdio --themes orion-fusion-theme",
"wdio": "terra wdio --themes terra-default-theme clinical-lowlight-theme orion-fusion-theme",
"wdio:docker": "terra wdio --disableSeleniumService=true --themes terra-default-theme clinical-lowlight-theme orion-fusion-theme"
"wdio:docker": "terra wdio --disableSeleniumService=true --themes terra-default-theme clinical-lowlight-theme orion-fusion-theme",
"npm:audit": "npm i --package-lock-only && npm audit --json > audit.json || true && if [ -s audit.json ]; then echo 'NPM audit vulnerabilities found:'; cat audit.json; fi"
},
"devDependencies": {
"@babel/cli": "^7.5.0",
Expand Down
Loading