-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1877 from sixlettervariables/run-board-validator-…
…on-push Update BoardsValidator and run it on Push/PR with boards
- Loading branch information
Showing
2 changed files
with
168 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# Validates Boards | ||
# | ||
# Jobs: | ||
# | ||
# - board_validator: Validate boards in MM | ||
# | ||
|
||
name: Validate Boards | ||
|
||
# | ||
# This Action Definition should be triggered only on | ||
# master being updated or Pull Requests being added | ||
# or updated against master. | ||
# | ||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
# This set of paths is the reasonable set which | ||
# should trigger a validation of the boards in MM. | ||
# If any changes are made to Board that use | ||
# a new class, update these blocks. | ||
- '**.board' | ||
- 'megamek/src/megamek/common/Board.java' | ||
- 'megamek/src/megamek/common/Building.java' | ||
- 'megamek/src/megamek/common/Terrains.java' | ||
- 'megamek/src/megamek/utils/BoardsValidator.java' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- '**.board' | ||
- 'megamek/src/megamek/common/Board.java' | ||
- 'megamek/src/megamek/common/Building.java' | ||
- 'megamek/src/megamek/common/Terrains.java' | ||
- 'megamek/src/megamek/utils/BoardsValidator.java' | ||
|
||
jobs: | ||
|
||
board_validator: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Grant execute permission for gradlew (*nix or MacOS) | ||
run: chmod +x gradlew | ||
|
||
# | ||
# Build the MegaMek project | ||
# | ||
- name: Create MM Jar | ||
run: ./gradlew jar --stacktrace | ||
|
||
# | ||
# Run the Boards Validator | ||
# | ||
- name: Validate Boards | ||
working-directory: megamek | ||
# Runs the BoardsValidator in default mode, which rips through | ||
# the ./data directory of the current working directory. | ||
# | ||
# The -q flag tells the validator to only print the filenames | ||
# that are invalid. | ||
run: java -cp build/libs/MegaMek.jar megamek.utils.BoardsValidator -q |
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