Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Backend CI

on:
pull_request:
paths:
- 'backend/**'
branches:
- main
- phase-4-demo-fixes

jobs:
backend-unit-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'

- name: Run Spring Boot tests
working-directory: backend
run: ./mvnw test
2 changes: 1 addition & 1 deletion .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'frontend/**'
branches:
- main
- phase-4
- phase-4-demo-fixes

jobs:
frontend-unit-tests:
Expand Down
Comment thread
eplxy marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public ResponseEntity<?> endTrip(@Valid @RequestBody EndTripDTO endTripDTO) {
} catch (IllegalArgumentException e) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new ResponseMessage(e.getMessage()));
} catch (IllegalStateException e) {
// steven asked for this!
return ResponseEntity.status(HttpStatus.I_AM_A_TEAPOT).body(new ResponseMessage(e.getMessage()));
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new ResponseMessage("An unexpected error occurred while ending the trip"));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"build": "cd frontend && bun run build",
"postinstall": "cd frontend && bun install",
"testui": "cd frontend && bun run test",
"testapi": "cd backend && ./mvnw test",
"coverage": "cd frontend && bun run coverage"
},
"devDependencies": {
Expand Down