Skip to content

Commit

Permalink
Create unittest.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CosminBalaita2003 authored Jan 30, 2025
1 parent 9564dfd commit 3b8c1d1
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Unit Testing Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
# Backend Unit Testing
backend-tests:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Set up Java 15
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '15'

# Install backend dependencies
- name: Install backend dependencies
run: mvn install

# Run backend unit tests
- name: Run backend unit tests
run: mvn test -Dtest=com.example.jobsnap.unit.*

# Frontend Unit Testing
frontend-tests:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Set up Node.js 20.18.1
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.18.1'

# Install frontend dependencies
- name: Install frontend dependencies
working-directory: ./frontend
run: npm install

# Run frontend unit tests
- name: Run frontend tests
working-directory: ./frontend
run: npm test

0 comments on commit 3b8c1d1

Please sign in to comment.