forked from eclipse-edc/Connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add check to verify proper file modification
- Loading branch information
1 parent
e0a90d6
commit 5e7db80
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,33 @@ jobs: | |
- name: Run Javadoc | ||
run: ./gradlew javadoc | ||
|
||
Verify-Api-Version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Checks to see if any change in any of the management API modules was done. If so, it sets the "mgmt" filter to "true" | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
mgmt: | ||
- 'extensions/control-plane/api/management-api/**/*.java' | ||
# Use the filter to check if files in any of the management API modules were changed | ||
# in the PR. If they were, check also, if the "api-version.json" file was appropriately modified | ||
|
||
- name: Inspect changeset if version file changed | ||
if: ${{ steps.filter.outputs.mgmt == 'true' }} | ||
run: | | ||
# check if changeset contains the `api-version.json` file | ||
changes=$(git diff --name-only main | grep "api-version.json" | wc -l) | ||
if [ $changes -lt 1 ]; then | ||
echo "::error file=./extensions/common/api/management-api-configuration/src/main/resources/api-version.json,line=1::Bumping the version is required after a change to the Management API" | ||
return 1; | ||
fi | ||
|
||
Unit-Tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
|