File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 type : string
2727
2828 pull_request :
29+ merge_group :
30+ types : [checks_requested]
2931 schedule :
3032 # Same schedule as nightly.yml
3133 - cron : " 0 5 * * 2-6" # Runs at 5:00 AM UTC, Tuesday through Saturday
3234
3335concurrency :
34- group : ${{ github.workflow }}-${{ github.ref }}
36+ group : ${{ github.workflow }}-${{ github.event.number || github.sha }}
3537 cancel-in-progress : true
3638
3739permissions :
4850 timeout-minutes : 30
4951 if : ${{ always() && (github.event_name != 'pull_request' || needs.changes.outputs.deny == 'true') }}
5052 needs : [changes]
51- env :
52- CARGO_INCREMENTAL : 0
5353 steps :
5454 - name : Checkout branch
5555 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6161 mold : false
6262 cargo-deny : true
6363
64- - name : Check cargo deny advisories/licenses
64+ - name : Check cargo deny (all)
6565 run : make check-deny
66+
67+ test-deny-licenses :
68+ runs-on : ubuntu-24.04
69+ timeout-minutes : 30
70+ if : ${{ always() && (github.event_name != 'pull_request' || needs.changes.outputs.deny == 'true') }}
71+ needs : [changes]
72+ steps :
73+ - name : Checkout branch
74+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
75+ with :
76+ ref : ${{ inputs.ref }}
77+
78+ - uses : ./.github/actions/setup
79+ with :
80+ mold : false
81+ cargo-deny : true
82+
83+ - name : Check cargo deny licenses
84+ run : make check-deny-licenses
Original file line number Diff line number Diff line change @@ -518,6 +518,10 @@ check-scripts: ## Check that scripts do not have common mistakes
518518check-deny : # # Check advisories licenses and sources for crate dependencies
519519 ${MAYBE_ENVIRONMENT_EXEC} $(VDEV ) check deny
520520
521+ .PHONY : check-deny-licenses
522+ check-deny-licenses : # # Check licenses for crate dependencies
523+ ${MAYBE_ENVIRONMENT_EXEC} $(VDEV ) check deny --licenses-only
524+
521525.PHONY : check-events
522526check-events : # # Check that events satisfy patterns set in https://github.com/vectordotdev/vector/blob/master/rfcs/2020-03-17-2064-event-driven-observability.md
523527 ${MAYBE_ENVIRONMENT_EXEC} $(VDEV ) check events
Original file line number Diff line number Diff line change @@ -5,10 +5,19 @@ use crate::app;
55/// Check for advisories, licenses, and sources for crate dependencies
66#[ derive( clap:: Args , Debug ) ]
77#[ command( ) ]
8- pub struct Cli { }
8+ pub struct Cli {
9+ /// Only check licenses
10+ #[ arg( long) ]
11+ licenses_only : bool ,
12+ }
913
1014impl Cli {
1115 pub fn exec ( self ) -> Result < ( ) > {
16+ let check = if self . licenses_only {
17+ "licenses"
18+ } else {
19+ "all"
20+ } ;
1221 app:: exec (
1322 "cargo" ,
1423 [
@@ -17,7 +26,7 @@ impl Cli {
1726 "error" ,
1827 "--all-features" ,
1928 "check" ,
20- "all" ,
29+ check ,
2130 ] ,
2231 true ,
2332 )
You can’t perform that action at this time.
0 commit comments