From 14d184d19c6bbca05ae4df77e139f9215adf4845 Mon Sep 17 00:00:00 2001 From: Thore Strassburg Date: Wed, 20 Dec 2023 15:15:47 +0100 Subject: [PATCH] Chore(vscode-extension): fix add CI job for license auditing NDISC-80 --- .github/workflows/pipeline.yml | 28 ++++++++++++++++++++++++++++ vscode-extension/.gitignore | 2 ++ vscode-extension/package.json | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ed788d5ce..87726398f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -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: diff --git a/vscode-extension/.gitignore b/vscode-extension/.gitignore index 38e898db9..0acdea4da 100644 --- a/vscode-extension/.gitignore +++ b/vscode-extension/.gitignore @@ -16,3 +16,5 @@ coverage/ # IntelliJ .idea/ + +licence-report.csv diff --git a/vscode-extension/package.json b/vscode-extension/package.json index cf4976b06..e89beeefe 100644 --- a/vscode-extension/package.json +++ b/vscode-extension/package.json @@ -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",