|
11 | 11 | workflow_dispatch: |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build: |
| 14 | + build-all: |
15 | 15 | name: Check if tests compile cleanly with starter sources |
| 16 | + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
16 | 17 | runs-on: ubuntu-24.04 |
17 | 18 | steps: |
18 | 19 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
19 | | - - name: Set up JDK 21 |
| 20 | + - name: Set up JDK 25 |
20 | 21 | uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 |
21 | 22 | with: |
22 | | - java-version: 21 |
| 23 | + java-version: 25 |
23 | 24 | distribution: "temurin" |
24 | 25 | - name: Check if tests compile cleanly with starter sources |
25 | 26 | run: ./gradlew compileStarterTestJava --continue |
26 | 27 | working-directory: exercises |
27 | 28 |
|
28 | | - lint: |
29 | | - name: Lint Java files using Checkstyle |
| 29 | + build-changed: |
| 30 | + name: Check if changed exercise tests compile cleanly with starter sources |
| 31 | + if: github.event_name == 'pull_request' |
| 32 | + runs-on: ubuntu-24.04 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 35 | + with: |
| 36 | + fetch-depth: 0 |
| 37 | + - name: Set up JDK 25 |
| 38 | + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 |
| 39 | + with: |
| 40 | + java-version: 25 |
| 41 | + distribution: "temurin" |
| 42 | + - name: Check if changed exercise tests compile cleanly |
| 43 | + run: bin/build-changed-exercise |
| 44 | + |
| 45 | + lint-all: |
| 46 | + name: Lint all Java files using Checkstyle |
| 47 | + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
30 | 48 | runs-on: ubuntu-24.04 |
31 | 49 | steps: |
32 | 50 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
33 | | - - name: Set up JDK 21 |
| 51 | + - name: Set up JDK 25 |
34 | 52 | uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 |
35 | 53 | with: |
36 | | - java-version: 21 |
| 54 | + java-version: 25 |
37 | 55 | distribution: "temurin" |
38 | 56 | - name: Run checkstyle |
39 | 57 | run: ./gradlew check --exclude-task test --continue |
40 | 58 | working-directory: exercises |
41 | 59 |
|
| 60 | + lint-changed: |
| 61 | + name: Lint changed Java exercises using Checkstyle |
| 62 | + if: github.event_name == 'pull_request' |
| 63 | + runs-on: ubuntu-24.04 |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 66 | + with: |
| 67 | + fetch-depth: 0 |
| 68 | + - name: Set up JDK 25 |
| 69 | + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 |
| 70 | + with: |
| 71 | + java-version: 25 |
| 72 | + distribution: "temurin" |
| 73 | + - name: Lint changed exercises |
| 74 | + run: bin/lint-changed-exercise |
| 75 | + |
42 | 76 | test-all: |
43 | 77 | name: Test all exercises using java-test-runner |
44 | 78 | if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
|
0 commit comments