-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/ci #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feature/ci #358
Conversation
pstoeckle
commented
Sep 26, 2025
- first draft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich denke als Einführung ist dies durchaus sinnvoll! Ich denke aber auch, dass wir noch etwas genauer beschreiben können wie eine CI funktioniert, oder zumindest den Code Snipped der Pipeline erklären, was ist der Trigger, wieso brauchen wir den etc.
Vielen Dank für den coolen Draft!
### Aufgabe 1: Erstelle ein GitHub Repository | ||
|
||
1. Gehe zu [GitHub](https://github.com/new) und erstelle ein neues Repository. | ||
2. Nenne das Repository `ci-example` und setze es auf "Public". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gibt es einen bestimmten Grund, wieso das Repo auf Public sein muss? (Ist so oder so default) vielleicht ist es auch eine Option, das Repo private zu lassen und die Accounts der Ausbildner hinzuzufügen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich hatte im Hinterkopf, dass es da Beschränkungen für die GitHub Actions gibt, wenn du ein Repo auf private hast. Finde dazu aber auf die Schnelle nichts. Von daher kann das auch weg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Siehe 6e6a454
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andiaeg hat mich mal gebeten die IT-Ninja-Warriors Org aufzusetzen. Denke wir könnten die Repositories dort erstellen, dann hätten alle Praxisbildner direkt access.
@andiaeg was meinst du?
8. Teste, ob Maven funktioniert. | ||
|
||
```shell | ||
mvn test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wir haben neuerdings in den Zipfiles runconfigurations für mvn test implementiert. In den vorhandenen Zipdateien, fehlen diese noch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aktuell liegt in der Zip Datei ein kleines Maven Projekt von mir. Wenn du @peggimann mir aber sagst, welchen Stand von bisherigen maven projekt ich nehmen soll, kann ich natürlich auch das reinkopieren.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gerne. Momentan verwenden wir diese struktur hier: https://github.com/it-ninjas/labs/blob/master/content/2025/labs/02_java/03_java-grundlagen/04_variables-and-types/it-ninja_02_java_03_java-grundlagen_04_variables-and-types.zip
Wir haben da auch schon die funktionierenden RunConfigs im .idea foll.der drin. Vlt hilft das als Inspiration :D
Alles klar, dann füge ich das noch hinzu |
@peggimann So besser? |
Siehe 6e93f4e |
### Aufgabe 2a: Teste Deine CI! (Optional) | ||
|
||
1. Füge dem Java Code einen Fehler hinzu, der verhindert, dass das Java Programm | ||
kompiliert werden kann oder die Tests fehlschlagen lässt. | ||
2. Committe und pushe die Änderungen. | ||
3. Gehe zu deinem GitHub Repository und klicke auf den Reiter `Actions`. | ||
Warte, bis dein Workflow abgeschlossen ist. | ||
Der Workflow sollte fehlschlagen und mit einem ❌ markiert sein. | ||
4. Klicke auf den Workflow, um die Details zu sehen. | ||
5. Klicke auf den Job `java-test` und dann auf den Step `Run JUnit tests using Maven`. | ||
Du solltest die Ausgabe von Maven sehen und dort auf den Fehler | ||
hingewiesen werden, den du gerade eingeführt hast. | ||
6. Fixe den Fehler wieder. | ||
7. Committe und pushe die Änderungen. | ||
8. Der Workflow sollte wieder erfolgreich sein und mit einem ✅ markiert sein. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vielleicht ist es hier noch eine Überlegung wert die Aufgabe 2a nicht optional zu machen? Die Lernenden sollten an diesem Punkt ja bereits Unit-Tests kennen und fixen können.
Stattdessen würde die Pipeline zuerst fehlschlagen, was direkt zeigt wieso CI wichtig ist. Dann müssten sie die Pipeline fixen, bis sie grün wird.
Ja sehr cool vielen Dank!!!! |