Skip to content

Commit

Permalink
add license-checkers github action
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvpickering committed Nov 16, 2022
1 parent 6b84c0f commit 91ef6c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]"
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'
Expand Down

0 comments on commit 91ef6c3

Please sign in to comment.