Skip to content

Commit 9df5e63

Browse files
authored
Fix broken Java CI with Gradle workflow (exercism#1988)
* Fix broken Java CI with Gradle workflow Fixes exercism#1986 * Add stacktrace to improve error messaging We probably have to track down some pre-existing issues now to re-enable this. * Fix pre-existing issues in the exercises
1 parent 30ff775 commit 9df5e63

4 files changed

Lines changed: 12 additions & 26 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,9 @@
33

44
name: Java CI with Gradle
55

6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
6+
on: [push, pull_request, workflow_dispatch]
117

128
jobs:
13-
lint:
14-
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- uses: actions/checkout@v2
19-
- name: Fetch configlet
20-
run: bin/fetch-configlet
21-
- name: Lint
22-
run: bin/configlet lint .
23-
249
build:
2510

2611
runs-on: ubuntu-latest
@@ -35,7 +20,7 @@ jobs:
3520
- name: Grant execute permission for gradlew
3621
run: chmod +x gradlew
3722
- name: Compile and checkstyle with Gradle
38-
run: cd exercises && ../gradlew check compileStarterSourceJava --parallel --continue
23+
run: cd exercises && ../gradlew check compileStarterSourceJava --parallel --continue --stacktrace
3924

4025
test:
4126

exercises/concept/need-for-speed/src/main/java/NeedForSpeed.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
class NeedForSpeed {
2-
// TODO: define the constructor for the 'RemoteControlCar' class
2+
// TODO: define the constructor for the 'NeedForSpeed' class
33

44
public boolean batteryDrained() {
5-
throw new UnsupportedOperationException("Please implement the RemoteControlCar.batteryDrained() method");
5+
throw new UnsupportedOperationException("Please implement the NeedForSpeed.batteryDrained() method");
66
}
77

88
public int distanceDriven() {
9-
throw new UnsupportedOperationException("Please implement the RemoteControlCar.distanceDriven() method");
9+
throw new UnsupportedOperationException("Please implement the NeedForSpeed.distanceDriven() method");
1010
}
1111

1212
public void drive() {
13-
throw new UnsupportedOperationException("Please implement the RemoteControlCar.drive() method");
13+
throw new UnsupportedOperationException("Please implement the NeedForSpeed.drive() method");
1414
}
1515

16-
public static RemoteControlCar nitro() {
17-
throw new UnsupportedOperationException("Please implement the (static) RemoteControlCar.ntiro() method");
16+
public static NeedForSpeed nitro() {
17+
throw new UnsupportedOperationException("Please implement the (static) NeedForSpeed.nitro() method");
1818
}
1919
}
2020

exercises/concept/wizards-and-warriors/src/main/java/Fighter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ boolean isVulnerable() {
88

99
}
1010

11-
class Warrior extends WizardsAndWarriors {
11+
class Warrior extends Fighter {
1212

1313
@Override
1414
public String toString() {
@@ -21,7 +21,7 @@ int damagePoints(Fighter wizard) {
2121
}
2222
}
2323

24-
class Wizard extends WizardsAndWarriors {
24+
class Wizard extends Fighter {
2525

2626
@Override
2727
boolean isVulnerable() {

exercises/practice/markdown/src/main/java/Markdown.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
class Markdown {
12

23
String parse(String markdown) {
34
String[] lines = markdown.split("\n");
@@ -76,4 +77,4 @@ private String parseSomeSymbols(String markdown) {
7677
update = "<em>$1</em>";
7778
return workingOn.replaceAll(lookingFor, update);
7879
}
79-
}
80+
}

0 commit comments

Comments
 (0)