Minimal setup for development #16
Workflow file for this run
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: Test API | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build and run Docker Compose | |
run: | | |
sudo docker compose up -d test | |
sudo 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: Show test logs | |
run: docker compose logs --no-log-prefix test |