Skip to content

added test to Continuous integration #9

added test to Continuous integration

added test to Continuous integration #9

Workflow file for this run

name: Spring-Boot Talent World CI/CD Pipeline
on:
push:
branches:
- master
jobs:
build-java-app:
name: Build and Deploy Spring Boot App
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 21
- name: Run tests
run: mvn clean test
- name: Build
run: mvn -B clean package --file pom.xml
# - name: Build
# run: mvn -B clean package --file pom.xml -DskipTests
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: fltepior/talentworld-backend:latest