Skip to content

Commit 81adfea

Browse files
committed
Revert "feat: add dprint for Markdown and YAML formatting"
This reverts commit b80b42a.
1 parent b80b42a commit 81adfea

File tree

8 files changed

+119
-128
lines changed

8 files changed

+119
-128
lines changed

.github/workflows/maven.yml

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
name: Java CI with Maven
22

33
on:
4-
schedule:
5-
# each fifteen day of month
6-
- cron: "0 0 15 * *"
7-
push:
8-
paths:
9-
- "java/**"
10-
- ".github/workflows/maven.yml"
11-
pull_request:
12-
paths:
13-
- "java/**"
14-
- ".github/workflows/maven.yml"
4+
schedule:
5+
# each fifteen day of month
6+
- cron: "0 0 15 * *"
7+
push:
8+
paths:
9+
- 'java/**'
10+
- ".github/workflows/maven.yml"
11+
pull_request:
12+
paths:
13+
- 'java/**'
14+
- ".github/workflows/maven.yml"
1515

1616
jobs:
17-
build:
18-
runs-on: ubuntu-latest
17+
build:
1918

20-
steps:
21-
- uses: actions/checkout@v4
22-
- name: Set up JDK 17
23-
uses: actions/setup-java@v4
24-
with:
25-
java-version: "17"
26-
distribution: "temurin"
27-
cache: maven
19+
runs-on: ubuntu-latest
2820

29-
- name: Build with Maven (Expecting at least one test to fail)
30-
run: |
31-
cd java
32-
mvn -B test --fail-at-end || true
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up JDK 17
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '17'
27+
distribution: 'temurin'
28+
cache: maven
3329

34-
if [ ! -d target/surefire-reports ]; then
35-
echo "Surefire reports directory not found! Failing the job."
36-
exit 1
37-
fi
30+
- name: Build with Maven (Expecting at least one test to fail)
31+
run: |
32+
cd java
33+
mvn -B test --fail-at-end || true
34+
35+
if [ ! -d target/surefire-reports ]; then
36+
echo "Surefire reports directory not found! Failing the job."
37+
exit 1
38+
fi
39+
40+
if grep -q "OrderStateTest\.orderCannotBeUpdatedOrCanceledIfPaid.*FAILURE" \
41+
target/surefire-reports/*.txt; then
42+
echo "Expected test failure detected — success as intended."
43+
else
44+
echo "Test did not fail as expected — this is a failure for this workflow."
45+
exit 1
46+
fi
3847

39-
if grep -q "OrderStateTest\.orderCannotBeUpdatedOrCanceledIfPaid.*FAILURE" \
40-
target/surefire-reports/*.txt; then
41-
echo "Expected test failure detected — success as intended."
42-
else
43-
echo "Test did not fail as expected — this is a failure for this workflow."
44-
exit 1
45-
fi

.github/workflows/python.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
name: Python CI
22

33
on:
4-
schedule:
5-
# each fifteen day of month
6-
- cron: "0 0 15 * *"
7-
push:
8-
branches:
9-
- main
10-
paths:
11-
- "python/**"
12-
- ".github/workflows/python.yml"
13-
pull_request:
14-
branches:
15-
- main
16-
paths:
17-
- "python/**"
18-
- ".github/workflows/python.yml"
4+
schedule:
5+
# each fifteen day of month
6+
- cron: "0 0 15 * *"
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- "python/**"
12+
- ".github/workflows/python.yml"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- "python/**"
18+
- ".github/workflows/python.yml"
1919

2020
jobs:
21-
build:
22-
runs-on: ubuntu-latest
21+
build:
22+
runs-on: ubuntu-latest
2323

24-
steps:
25-
- uses: actions/checkout@v4
26-
- uses: astral-sh/setup-uv@v6
27-
with:
28-
version: "latest"
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: astral-sh/setup-uv@v6
27+
with:
28+
version: "latest"
2929

30-
- name: all tests except the expected failing one
31-
working-directory: python
32-
run: uv run pytest -k "not test_order_cannot_be_updated_or_canceled_if_paid" -v
30+
- name: all tests except the expected failing one
31+
working-directory: python
32+
run: uv run pytest -k "not test_order_cannot_be_updated_or_canceled_if_paid" -v
3333

34-
- name: expected failing test
35-
working-directory: python
36-
run: |
37-
! uv run pytest -k "test_order_cannot_be_updated_or_canceled_if_paid" --tb=short
34+
- name: expected failing test
35+
working-directory: python
36+
run: |
37+
! uv run pytest -k "test_order_cannot_be_updated_or_canceled_if_paid" --tb=short

.github/workflows/typescript.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
name: TypeScript CI
22

33
on:
4-
schedule:
5-
# each fifteen day of month
6-
- cron: "0 0 15 * *"
7-
push:
8-
branches:
9-
- main
10-
paths:
11-
- "typescript/**"
12-
- ".github/workflows/typescript.yml"
13-
pull_request:
14-
branches:
15-
- main
16-
paths:
17-
- "typescript/**"
18-
- ".github/workflows/typescript.yml"
4+
schedule:
5+
# each fifteen day of month
6+
- cron: "0 0 15 * *"
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- "typescript/**"
12+
- ".github/workflows/typescript.yml"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- "typescript/**"
18+
- ".github/workflows/typescript.yml"
1919

2020
jobs:
21-
build:
22-
runs-on: ubuntu-latest
21+
build:
22+
runs-on: ubuntu-latest
2323

24-
steps:
25-
- uses: actions/checkout@v4
26-
- uses: oven-sh/setup-bun@v2
27-
with:
28-
bun-version: latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: latest
2929

30-
- name: install dependencies
31-
working-directory: typescript
32-
run: bun install
30+
- name: install dependencies
31+
working-directory: typescript
32+
run: bun install
3333

34-
- name: type check
35-
working-directory: typescript
36-
run: bunx tsgo --noEmit
34+
- name: type check
35+
working-directory: typescript
36+
run: bunx tsgo --noEmit
3737

38-
- name: all tests except the expected failing one
39-
working-directory: typescript
40-
run: |
41-
# Run all tests but exclude the one we expect to fail
42-
# Using a regex pattern that matches everything except the failing test
43-
bun test --test-name-pattern="^(?!.*order cannot be updated or canceled if paid).*$"
38+
- name: all tests except the expected failing one
39+
working-directory: typescript
40+
run: |
41+
# Run all tests but exclude the one we expect to fail
42+
# Using a regex pattern that matches everything except the failing test
43+
bun test --test-name-pattern="^(?!.*order cannot be updated or canceled if paid).*$"
4444
45-
- name: expected failing test
46-
working-directory: typescript
47-
run: |
48-
# This test should fail due to the bug in isPaid() method
49-
! bun test --test-name-pattern="order cannot be updated or canceled if paid"
45+
- name: expected failing test
46+
working-directory: typescript
47+
run: |
48+
# This test should fail due to the bug in isPaid() method
49+
! bun test --test-name-pattern="order cannot be updated or canceled if paid"

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
# CoffeeShop Test Design Kata
1+
CoffeeShop Test Design Kata
2+
===========================
3+
24

35
## Learning to write Parameterized Tests
46

57
This code base is designed to be used with this learning hour on [Parameterized Tests](https://sammancoaching.org/learning_hours/test_design/parameterized_tests.html)
68

7-
In the learning hour description, there's the `do`section that requests you to create some tests with a lot of duplication where one of the tests should be failing. So that's the code base where the `do` is already done, and you can focus on parameterized tests.
9+
In the learning hour description, there's the ```do```section that requests you to create some tests with a lot of duplication where one of the tests should be failing. So that's the code base where the ```do``` is already done, and you can focus on parameterized tests.
810

911
Note: There's a bug in the implementation, (marked with the comment "Bug!"), so we have a failing test here (see learning hour description for more information on why that is).
1012

11-
In the java directory there's a `concept` sub-package that show-cases JUnit5 features for writing parameterized tests.
13+
In the java directory there's a ```concept``` sub-package that show-cases JUnit5 features for writing parameterized tests.
1214

1315
## Notes for contributors
1416

1517
We would welcome pull requests with additional languages. Please include the bug that causes failing tests. If possible please also include a 'concept' example for your favourite test framework.
1618

1719
## Acknowledgements
1820

19-
This code katas was created at Atruvia and originally published on github as part of a collection of [samman coaching katas](https://github.com/atruvia/samman-coaching-katas).
21+
This code katas was created at Atruvia and originally published on github as part of a collection of [samman coaching katas](https://github.com/atruvia/samman-coaching-katas).

java/src/test/java/org/sammancoaching/parameterizedtests/concept/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
In `ParameterizedTests` liegen JUnit5 Beispiele, wie man auf Basis von JUnit5 parametrisierbare Tests erstellen kann. Dies ist für den "concept" Teil einer Samman-Coaching-Learning-Hour vorgesehen.
1+
In `ParameterizedTests` liegen JUnit5 Beispiele, wie man auf Basis von JUnit5 parametrisierbare Tests erstellen kann. Dies ist für den "concept" Teil einer Samman-Coaching-Learning-Hour vorgesehen.
22

3-
Im "concrete" Teil ist die Aufgabe, den `OrderStateTest` zu einem parametrisierbaren Test umzubauen (genauere Beschreibung hierzu siehe LH-Beschreibung intern oder [extern](https://sammancoaching.org/learning_hours/test_design/parameterized_tests.html)).
4-
5-
Eine **mögliche** Lösung kann wie folgt aussehen:
3+
Im "concrete" Teil ist die Aufgabe, den `OrderStateTest` zu einem parametrisierbaren Test umzubauen (genauere Beschreibung hierzu siehe LH-Beschreibung intern oder [extern](https://sammancoaching.org/learning_hours/test_design/parameterized_tests.html)).
64

5+
Eine **mögliche** Lösung kann wie folgt aussehen:
76
```
87
@ParameterizedTest
98
@EnumSource(value = Status.class, mode = EXCLUDE, names = "PAYMENT_EXPECTED")
@@ -28,9 +27,9 @@ private static Order existingOrderWithStatus(Status status) {
2827
}
2928
```
3029

31-
Weitere Möglichkeiten sind:
32-
30+
Weitere Möglichkeiten sind:
3331
- EnumSource mit Assumptions statt EXCLUDE
3432
- EnumSource mit guard statement statt EXCLUDE (nicht wirklich gut, da damit ein "grüner" Test erzeugt wir der eigentlich kein Test ist)
3533
- CsvSource, ParameterType Status (JUnit macht das Status.valueOf(String) selbst
3634
- ???
35+

python/tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ uv run pytest tests/test_parametrized_examples.py::TestDynamicParametrization -v
6969
- Dynamic test generation is more flexible
7070
- No special CSV file source - just use Python to read files
7171
- Fixture parametrization adds extra power
72-
- Can parametrize entire classes, not just methods
72+
- Can parametrize entire classes, not just methods

typescript/dprint.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"test": "bun test",
77
"typecheck": "bunx tsgo --noEmit",
8-
"format": "biome format --write . && dprint fmt README.md && dprint fmt ../.github/workflows/*.yml",
8+
"format": "biome format --write .",
99
"check": "bunx tsgo --noEmit && biome check ."
1010
},
1111
"devDependencies": {

0 commit comments

Comments
 (0)