diff --git a/.github/workflows/test-license-scan.yml b/.github/workflows/test-license-scan.yml new file mode 100644 index 00000000..81508995 --- /dev/null +++ b/.github/workflows/test-license-scan.yml @@ -0,0 +1,16 @@ +name: Test bottlerocket-license-scan +on: + pull_request: + branches: + - "*" + paths: + - "license-scan/**" +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup update stable + - run: cargo install cargo-deny --locked + - run: make build + working-directory: ./license-scan diff --git a/license-scan/Makefile b/license-scan/Makefile new file mode 100644 index 00000000..42865905 --- /dev/null +++ b/license-scan/Makefile @@ -0,0 +1,24 @@ +TOP := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) + +.PHONY: deny +deny: + cargo deny --no-default-features check licenses bans sources + +.PHONY: clippy +clippy: + cargo clippy --locked -- -D warnings --no-deps + +.PHONY: fmt +fmt: + cargo fmt --check + +.PHONY: test +test: + cargo test --locked + +.PHONY: check +check: fmt clippy deny test + +.PHONY: build +build: check + cargo build --locked