Skip to content

chore: fix test workflow #2

chore: fix test workflow

chore: fix test workflow #2

Workflow file for this run

name: Test API
on:
push:
branches:
- total-fix-authorization # Замените "main" на вашу основную ветку
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Compose
uses: docker/setup-buildx-action@v3
- name: Build and run Docker Compose
run: |
docker-compose up --build -d test
docker-compose logs -f test > test_logs.txt
continue-on-error: true
- name: Check test results
run: |
if grep -q "Test Suites: .* failed" test_logs.txt; then
echo "Tests failed"
exit 1
else
echo "Tests passed"
fi
- name: Upload test logs
uses: actions/upload-artifact@v2
with:
name: test-logs
path: test_logs.txt