Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ Ved å konfigurerere main som en beskyttet branch, og ved å bruke "status sjekk
- Velg *main* Som branch
- Velg ```require a pull request before merging```
- Velg ````Require status check to pass before merging````
<<<<<<< HEAD
- Velg ```Do not allow bypassing the above settings```
- I søkefeltet skriv inn teksten *build* som skal la deg velge "GitHub Actions".
=======
- Trykk "+Add checks"- I søkefeltet skriv inn teksten *build* som skal la deg velge "GitHub Actions".
>>>>>>> origin/main

* Nå kan vi ikke Merge en pull request inn i Main uten at status sjekken er i orden. Det betyr at vår Workflow har kjørt OK.
* Ingen i teamet kan nå "snike seg unna" denne sjekken ved å comitte kode rett på main branch, selv ikke admin
Expand All @@ -239,7 +244,11 @@ git checkout -b will_break_4_sure
git push --set-upstream origin will_break_4_sure
```

<<<<<<< HEAD
- OBS! GitHub velger repository du lagde forken FRA som kilde når du lager en pull request første gang. Du må endre nedtrekksmenyen til ditt eget repo.
=======
- OBS! Default, så vil GitHub velger repository du lagde forken FRA som kilde når du lager en pull request første gang. Det blir feil, fordi det ikke er ditt repository. Du må derfor endre dette i nedtrekksmenyen, til ditt eget repo.
>>>>>>> origin/main
- Gå til ditt repo på GitHub.com og forsøk å lage en Pull request fra din branch ```will_break_4_sure``` til main.
- Sjekk at du ikke får lov til å gjøre en Merge fordi koden ikke kompilerer

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/pgr301/exam/BackEndException.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.pgr301.exam;

public class BackEndException extends RuntimeException {
ddttrtrtdfd
}
10 changes: 10 additions & 0 deletions target/classes/Logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
</encoder>
</appender>
<root level="error">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
2 changes: 2 additions & 0 deletions target/classes/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
management.endpoints.web.exposure.include=*
management.metrics.export.influx.step=1s
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
com/pgr301/exam/BankAccountApplication.class
com/pgr301/exam/model/Transaction.class
com/pgr301/exam/model/Account.class
com/pgr301/exam/BankAccountController$AccountNotFoundException.class
com/pgr301/exam/BankAccountController.class
com/pgr301/exam/BankingCoreSystmeService.class
com/pgr301/exam/BackEndException.class
com/pgr301/exam/ReallyShakyBankingCoreSystemService.class
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/BankAccountController.java
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/ReallyShakyBankingCoreSystemService.java
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/model/Transaction.java
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/BackEndException.java
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/model/Account.java
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/BankingCoreSystmeService.java
/home/ec2-user/environment/01-CI-Github-actions/src/main/java/com/pgr301/exam/BankAccountApplication.java