forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (67 loc) · 2.25 KB
/
java.yml
File metadata and controls
72 lines (67 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
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: Archive test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: test-results
path: exercises/**/build/results.json
if: failure()