Jakarta Data Guide feedback suggestions #52
This file contains hidden or 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
| name: Test application | |
| on: | |
| pull_request: | |
| branches: [ draft ] | |
| jobs: | |
| check-files: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| outputs: | |
| canSkip: ${{ steps.Checker.outputs.canSkip }} | |
| steps: | |
| - name: Get files | |
| uses: actions/checkout@v5 | |
| with: | |
| # super-linter needs the full git history to get the | |
| # list of files that changed across commits | |
| fetch-depth: 0 | |
| - name: Get tools | |
| uses: actions/checkout@v5 | |
| with: | |
| path: tools/ | |
| repository: openliberty/guides-common | |
| - id: Checker | |
| shell: bash | |
| run: bash ./tools/pr-checker/checker.sh ${{ github.repository }} ${{ github.event.pull_request.number }} | tee checker.log | |
| - id: Lint-Code-Base | |
| if: "! github.event.pull_request.head.repo.fork" | |
| uses: super-linter/[email protected] | |
| env: | |
| VALIDATE_ALL_CODEBASE: false | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| LINTER_RULES_PATH: ./tools/pr-checker/linters/ | |
| DEFAULT_BRANCH: draft | |
| #Should this just be VALIDATE_JAVA: true? | |
| VALIDATE_CSS: false | |
| VALIDATE_CSS_PRETTIER: false | |
| VALIDATE_JAVASCRIPT_STANDARD: false | |
| VALIDATE_CHECKOV: false | |
| VALIDATE_JSCPD: false | |
| VALIDATE_YAML_PRETTIER: false | |
| VALIDATE_GOOGLE_JAVA_FORMAT: false | |
| VALIDATE_HTML: false | |
| VALIDATE_HTML_PRETTIER: false | |
| VALIDATE_JAVASCRIPT_ES: false | |
| VALIDATE_JAVASCRIPT_PRETTIER: false | |
| VALIDATE_MARKDOWN_PRETTIER: false | |
| VALIDATE_SHELL_SHFMT: false | |
| - name: Summary | |
| if: "! github.event.pull_request.head.repo.fork" | |
| run: | | |
| < ./checker.log tail -n +2; echo "====== Super Linter ======" | |
| < ./super-linter.log sed -n '/.*The script has completed.*/,$p' | tail -n +4 | sed 's/.*\(\[[A-Z]\+\]\)/\1/' | |
| echo "====== Examine logs in Checker and Super-Linter steps for more details ======" | |
| if [ '${{ steps.Checker.outcome }}' != 'success' ] || [ '${{ steps.Lint-Code-Base.outcome }}' != 'success' ]; then exit 1; fi | |
| test-app: | |
| runs-on: ubuntu-latest | |
| needs: [check-files] | |
| if: "!contains(needs.check-files.outputs.canSkip, 'true')" | |
| defaults: | |
| run: | |
| working-directory: finish | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'semeru' | |
| java-version: 21 | |
| - run: unset _JAVA_OPTIONS | |
| - name: Run tests | |
| run: | | |
| chmod +x ../scripts/test*.sh | |
| sudo -E ../scripts/testAppFinish.sh | |
| sudo -E ../scripts/testAppStart.sh | |
| - name: Post tests | |
| if: always() | |
| run: | | |
| sudo chmod -R +rx target | |
| logsPath=$(sudo find . -name "console.log"); | |
| sudo cat "$logsPath" | sudo grep Launching | |
| sudo chmod 777 target/liberty/wlp/usr/servers/defaultServer/logs | |
| - name: Archive finish logs if failed | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: finish-logs | |
| path: finish/target/liberty/wlp/usr/servers/defaultServer/logs/ | |
| - name: Archive start logs if failed | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: start-logs | |
| path: start/target/liberty/wlp/usr/servers/defaultServer/logs/ |