Skip to content

Added CI workflow for auto-test #1

Added CI workflow for auto-test

Added CI workflow for auto-test #1

Workflow file for this run

name: Keploy CI Workflow
on:
push:
branches:
- main
pull_request:
jobs:
keploy-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: employee
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Build the project
run: mvn clean install
- name: Run the app in Keploy record mode
env:
SPRING_DATASOURCE_URL: jdbc:postgresql://localhost:5432/employee
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
KEPLOY_MODE: record
run: |
mvn spring-boot:run &
sleep 30
curl -X GET http://localhost:8080/employee/all