Bump DavidAnson/markdownlint-cli2-action from 20.0.0 to 21.0.0 (#3060) #675
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: Java | |
| on: | |
| pull_request: | |
| paths: | |
| - "**/*.java" | |
| - "**/*.gradle" | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Check if tests compile cleanly with starter sources | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| - name: Set up JDK 1.17 | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 | |
| with: | |
| java-version: 17 | |
| distribution: "temurin" | |
| - name: Check if tests compile cleanly with starter sources | |
| run: ./gradlew compileStarterTestJava --continue | |
| working-directory: exercises | |
| lint: | |
| name: Lint Java files using Checkstyle | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| - name: Set up JDK 1.17 | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 | |
| with: | |
| java-version: 17 | |
| distribution: "temurin" | |
| - name: Run checkstyle | |
| run: ./gradlew check --exclude-task test --continue | |
| working-directory: exercises | |
| test-all: | |
| name: Test all exercises using java-test-runner | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| - name: Test all exercises using java-test-runner | |
| run: bin/test-with-test-runner | |
| - name: Print summary | |
| run: | | |
| if [ -f exercises/build/summary.txt ]; then | |
| echo "===== TEST SUMMARY =====" | |
| cat exercises/build/summary.txt | |
| echo "========================" | |
| else | |
| echo "===== ALL TESTS PASSED =====" | |
| echo "No summary file was generated." | |
| echo "=============================" | |
| fi | |
| if: always() | |
| - name: Archive test results | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 | |
| with: | |
| name: test-results | |
| path: exercises/**/build/results.json | |
| if: failure() | |
| test-changed: | |
| name: Test changed exercises using gradlew | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| with: | |
| fetch-depth: 0 | |
| - name: Test changed exercises using java-test-runner | |
| run: bin/test-changed-exercise | |
| - name: Print summary | |
| run: | | |
| if [ -f exercises/build/summary.txt ]; then | |
| echo "===== TEST SUMMARY =====" | |
| cat exercises/build/summary.txt | |
| echo "========================" | |
| else | |
| echo "===== ALL TESTS PASSED =====" | |
| echo "No summary file was generated." | |
| echo "=============================" | |
| fi | |
| if: always() | |
| - name: Archive test results | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 | |
| with: | |
| name: test-results | |
| path: | | |
| exercises/**/build/results.txt | |
| exercises/**/build/results.json | |
| if: failure() |