Merge pull request #64 from arteevraina/report-frontend #166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests for Backend | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout page source | |
uses: actions/checkout@v4 | |
- name: Build the Docker image and run tests | |
run: docker compose -f "backend/compose.test.yaml" up -d | |
- name: Print Logs for Container | |
run: | | |
export CONTAINER_ID=$(docker ps -aqf "name=backend-test_ci-1") | |
docker logs -f $CONTAINER_ID 2>&1 | grep -i "FAILED" && exit 1 || exit 0 | |
- name: Stop and remove the container | |
run: docker compose -f "backend/compose.test.yaml" down |