Skip to content

Commit

Permalink
Chore(vscode-extension): fix add CI job for license auditing
Browse files Browse the repository at this point in the history
NDISC-80
  • Loading branch information
weilbith committed Dec 20, 2023
1 parent 002d0d9 commit 14d184d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,34 @@ jobs:
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

audit-licenses-vscode-extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ./vscode-extension/.node-version
cache: npm
cache-dependency-path: ./vscode-extension/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./vscode-extension
- name: Run license scanner
run: npm run audit:licences
working-directory: ./vscode-extension
- name: Upload licence report
uses: actions/upload-artifact@v3
with:
name: vscode-extension-licence-report.csv
retention-days: 3
path: vscode-extension/licence-report.csv
- name: Send status to Slack
uses: digitalservicebund/notify-on-failure-gha@15dd05b628141b7bac0ad26e08c1935cb3ba6bc8 # v1.4.0
if: ${{ failure() && github.ref == 'refs/heads/main' }}
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

build-and-test-vscode-extension:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions vscode-extension/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ coverage/

# IntelliJ
.idea/

licence-report.csv
2 changes: 1 addition & 1 deletion vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prettier:fix": "f() { prettier --write ${@:-.}; }; f",
"style:check": "f() { npm run typecheck && npm run prettier:check $@ && npm run eslint:check $@; }; f",
"style:fix": "f() { npm run prettier:fix $@ && npm run eslint:fix $@; }; f",
"audit:licences": "license-checker --production --excludePrivatePackages --onlyAllow \"$(. ./parseAllowedLicences.sh)\" --csv --out ./frontend-licence-report.csv"
"audit:licences": "license-checker --production --excludePrivatePackages --onlyAllow \"$(. ./parseAllowedLicences.sh)\" --csv --out ./licence-report.csv"
},
"devDependencies": {
"@types/mocha": "^10.0.2",
Expand Down

0 comments on commit 14d184d

Please sign in to comment.