Skip to content

[BE-INFRA] Tomcat thread pool 및 MongoDB connection pool 설정 #404

[BE-INFRA] Tomcat thread pool 및 MongoDB connection pool 설정

[BE-INFRA] Tomcat thread pool 및 MongoDB connection pool 설정 #404

Workflow file for this run

name: Backend CI
on:
pull_request:
branches: [ "be/develop" ]
workflow_call:
permissions:
contents: read
jobs:
test:
runs-on: ci
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Remove Containers
run: |
docker ps -aq | xargs -r docker rm -vf
docker system prune -a -f
- name: Set up Test MongoDB
working-directory: ./backend/pokerogue/src/main/resources/
run: docker-compose -f docker-compose-ci.yml up -d
- name: Wait for Test MongoDB to be ready
working-directory: ./backend/pokerogue/src/main/resources/
run: |
for i in {1..30}; do
if docker-compose -f docker-compose-ci.yml exec -T pokerogue-db mongo -u ${{ secrets.TEST_DB_USERNAME }} -p ${{ secrets.TEST_DB_PASSWORD }} --authenticationDatabase admin --eval "db.runCommand({ ping: 1 })" --quiet; then
echo "MongoDB is up and running!"
break
else
echo "Waiting for MongoDB to be ready..."
sleep 5
fi
done
- name: Run Test
working-directory: ./backend/pokerogue
run: ./gradlew clean test