Miscellaneous fixes for headless legacy #164
Workflow file for this run
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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | |
name: "Pull Request validation" | |
on: | |
# Triggers the workflow on pull request events | |
pull_request: | |
workflow_dispatch: # For manual trigger | |
jobs: | |
compiling-gama-base: | |
name: Compiling GAMA from base branch | |
uses: ./.github/workflows/travis-build.yaml | |
with: | |
get_testing_compiled_archives: false | |
get_all_archives_for_release: false | |
RUN_SPOTBUGS: true | |
SPOTBUGS_OUTPUT_ARTIFACT_NAME: "result-spotbugs-base" | |
CHECKOUT_BRANCH: "2024-06" | |
compiling-gama-pr: | |
name: Compiling GAMA from PR branch | |
uses: ./.github/workflows/travis-build.yaml | |
with: | |
get_testing_compiled_archives: true | |
get_all_archives_for_release: false | |
RUN_SPOTBUGS: true | |
SPOTBUGS_OUTPUT_ARTIFACT_NAME: "result-spotbugs-pr" | |
testing-gama-pr: | |
name: Testing built GAMA | |
needs: compiling-gama-pr | |
uses: ./.github/workflows/travis-build-test.yaml | |
spotbugs-result: | |
name: Display Spotbugs results | |
runs-on: ubuntu-latest | |
needs: [compiling-gama-base, compiling-gama-pr] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Spotbugs result from base branch | |
uses: actions/download-artifact@v4 | |
with: | |
name: result-spotbugs-base | |
path: ${{ github.workspace }}/main | |
- name: Get Spotbugs result from PR branch | |
uses: actions/download-artifact@v4 | |
with: | |
name: result-spotbugs-pr | |
path: ${{ github.workspace }}/pull-request | |
- name: Calculate diff between results | |
run: | | |
python3 -m pip install lxml | |
python3 $GITHUB_WORKSPACE/travis/get_spotbugs_xml_diff.py -n $GITHUB_WORKSPACE/pull-request/spotbugsXml.xml -o $GITHUB_WORKSPACE/main/spotbugsXml.xml -d $GITHUB_WORKSPACE/final-report-spotbugsXml.xml | |
- uses: lcollins/spotbugs-github-action@v3.0.0 | |
with: | |
path: ${{ github.workspace }}/final-report-spotbugsXml.xml | |
fail-on-violation: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: final-report-spotbugs | |
if-no-files-found: error | |
compression-level: 9 | |
overwrite: true | |
path: ${{ github.workspace }}/final-report-spotbugsXml.xml |