Skip to content

Commit

Permalink
feat: modfied action to take log and save it when error
Browse files Browse the repository at this point in the history
  • Loading branch information
kevkevinpal committed Dec 6, 2024
1 parent 51b4ba7 commit 54fc1c1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/prjob_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,21 @@ jobs:
run: go get golang.org/x/tools/cmd/cover

- name: Tests
run: sudo V2_BOT_URL=http://localhost:3005 V2_BOT_TOKEN=xyzxyzxyz go test ./... -race -v -coverprofile=coverage.out && ./cover-check.sh coverage.out 8.4
run: |
sudo V2_BOT_URL=http://localhost:3005 V2_BOT_TOKEN=xyzxyzxyz go test ./... -race -v -coverprofile=coverage.out > test_output.log 2>&1
./cover-check.sh coverage.out 8.4
if [ -f "test_output.log" ]; then
sudo cat test_output.log
else
echo "Log file not found!"
fi
- name: Upload test log
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-logs
path: test_output.log

- name: Droping DB with docker compose
run: docker compose -f ./docker/testdb-docker-compose.yml -p test_db down
Expand Down

0 comments on commit 54fc1c1

Please sign in to comment.