From da39b22ce12d64c7f5037a08ca2366a11ac5b7a2 Mon Sep 17 00:00:00 2001 From: a-dubaj Date: Wed, 26 Jun 2024 00:15:11 +0200 Subject: [PATCH] feat: Update workflow to log with timestamp --- .github/workflows/python-app.yml | 3 ++- log_with_timestamp.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 log_with_timestamp.sh diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0ee7be9..6a10670 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -30,4 +30,5 @@ jobs: env: PYTHONPATH: ${{ github.workspace }} run: | - xvfb-run -a pytest tests/ + chmod +x log_with_timestamp.sh + xvfb-run -a pytest tests/ 2>&1 | ./log_with_timestamp.sh diff --git a/log_with_timestamp.sh b/log_with_timestamp.sh new file mode 100644 index 0000000..95b0940 --- /dev/null +++ b/log_with_timestamp.sh @@ -0,0 +1,5 @@ +#!/bin/bash +while IFS= read -r line +do + echo "$(date '+%Y-%m-%d %H:%M:%S') $line" +done