Skip to content

Commit

Permalink
Make action fail if there are REST calls or endpoints that cannot be …
Browse files Browse the repository at this point in the history
…matched.
  • Loading branch information
Jan-Thurner committed Sep 8, 2024
1 parent 425f861 commit 024041a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/analysis-of-endpoint-connections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ jobs:
path: supporting_scripts/analysis-of-endpoint-connections/

- name: Analyze endpoints
run:
run: |
./gradlew :supporting_scripts:analysis-of-endpoint-connections:runEndpointAnalysis
continue-on-error: true

- name: Analyze rest calls
run:
run: |
./gradlew :supporting_scripts:analysis-of-endpoint-connections:runRestCallAnalysis
continue-on-error: true

- name: Upload analysis results
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,9 @@ private static void printEndpointAnalysisResult() {
});

log.info("Number of endpoints without matching REST calls: {}", endpointsAndMatchingRestCalls.unusedEndpoints().size());

if (!endpointsAndMatchingRestCalls.unusedEndpoints().isEmpty()) {
System.exit(1);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,9 @@ private static void printRestCallAnalysisResult() {
});

log.info("Number of REST calls without matching endpoints: {}", restCallsAndMatchingEndpoints.restCallsWithoutMatchingEndpoints().size());

if (restCallsAndMatchingEndpoints.restCallsWithMatchingEndpoints().isEmpty()) {
System.exit(1);
}
}
}

0 comments on commit 024041a

Please sign in to comment.