Skip to content
Merged
43 changes: 43 additions & 0 deletions .github/workflows/run-express-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Run Express Tests

on:
pull_request:
branches:
- development
push:
branches:
- development

jobs:
test:
name: Run Express Tests
runs-on: ubuntu-latest

defaults:
run:
working-directory: server/express

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test
env:
MONGODB_URI: ${{ secrets.MFLIX_URI }}

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: server/express/coverage/
retention-days: 30
58 changes: 58 additions & 0 deletions .github/workflows/run-java-spring-boot-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Run Java Spring Boot Tests

on:
pull_request:
branches:
- development
push:
branches:
- development

jobs:
test:
name: Run Java Spring Boot Tests
runs-on: ubuntu-latest

defaults:
run:
working-directory: server/java-spring

steps:
- name: Checkout code
uses: actions/checkout@v5

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

- name: Make mvnw executable
run: chmod +x mvnw

- name: Run unit tests
run: ./mvnw test
env:
MONGODB_URI: ${{ secrets.MFLIX_URI }}

- name: Run integration tests
run: ./mvnw test -Dtest=MongoDBSearchIntegrationTest
env:
MONGODB_URI: ${{ secrets.MFLIX_URI }}
ENABLE_SEARCH_TESTS: true
continue-on-error: true

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: server/java-spring/target/surefire-reports/
retention-days: 30

- name: Test Summary
uses: test-summary/action@v2
if: always()
with:
paths: server/java-spring/target/surefire-reports/TEST-*.xml