diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 287eae229..5aeab71ee 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -46,6 +46,7 @@ Your changes will be ready for merging after all of the steps below have been co ### Code updates Have best practices and ongoing refactors being observed in this PR - [ ] Migrated any selector / reducer used to the new format. +- [ ] All new dependency licenses have been checked for compatibility ### Manual/unit testing - [ ] Tested changes using InfraMock locally **or** no tests required for change, e.g. Kubernetes chart updates. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 28b86598f..8d2cd5307 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -91,6 +91,15 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 + - id: check-licenses + name: Check licenses + env: + ALLOWED_LICENSES: "MIT;ISC;Apache-2.0;BSD-3-Clause;BSD-2-Clause;(MIT OR Apache-2.0);Unlicense;Python-2.0;BSD;(AFL-2.1 OR BSD-3-Clause);0BSD" + EXCLUDE_PACKAGES: "cluster-key-slot@1.1.0" + run: |- + npm install -g license-checker + license-checker --production --json --onlyAllow="${ALLOWED_LICENSES}" --excludePackages="${EXCLUDE_PACKAGES}" + - id: send-to-slack name: Send failure notification to Slack if: failure() && github.event_name == 'push'