Update action.yml
This commit is contained in:
+28
-18
@@ -170,39 +170,49 @@ runs:
|
||||
echo "▶️ Running tests inside tmux session (with D-Bus)"
|
||||
echo "▶️ Running tests inside tmux session (with D-Bus)" >> "$LOG_FILE"
|
||||
|
||||
# Start DBus before tmux
|
||||
DBUS_INFO=$(dbus-launch)
|
||||
eval "$DBUS_INFO"
|
||||
export DBUS_SESSION_BUS_ADDRESS
|
||||
|
||||
./start-notification-service.sh
|
||||
|
||||
tmux new-session -d -s test-session "
|
||||
export DBUS_SESSION_BUS_ADDRESS=\"$DBUS_SESSION_BUS_ADDRESS\"
|
||||
pixi run pytest -s \"$TEST_PATH\" $PYTEST_ARGS
|
||||
TMUX_TTY=\$(tmux list-panes -t test-session -F '#{pane_tty}');
|
||||
export TMUX_TTY;
|
||||
|
||||
dbus-run-session -- bash -c '
|
||||
./start-notification-service.sh &
|
||||
SERVICE_PID=\$!
|
||||
sleep 2
|
||||
|
||||
gdbus introspect --session \
|
||||
--dest org.freedesktop.Notifications \
|
||||
--object-path /org/freedesktop/Notifications \
|
||||
|| exit 1
|
||||
|
||||
pixi run pytest -s \"$TEST_PATH\" $PYTEST_ARGS
|
||||
kill \$SERVICE_PID
|
||||
'
|
||||
tmux wait-for -S done
|
||||
" >> outputs/full-output.log 2>&1
|
||||
|
||||
sleep 1
|
||||
tmux wait-for done
|
||||
kill $(cat /tmp/notify-service.pid)
|
||||
else
|
||||
# Version sans tmux
|
||||
echo "▶️ Running tests (with D-Bus)"
|
||||
echo "▶️ Running tests (with D-Bus)" >> "$LOG_FILE"
|
||||
|
||||
eval "$(dbus-launch --sh-syntax)"
|
||||
export DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS"
|
||||
|
||||
./start-notification-service.sh
|
||||
sleep 1 # Attendre que le service soit prêt
|
||||
dbus-run-session -- bash -c "
|
||||
./start-notification-service.sh &
|
||||
SERVICE_PID=\$!
|
||||
sleep 2
|
||||
|
||||
pixi run pytest -s "$TEST_PATH" $PYTEST_ARGS
|
||||
gdbus introspect --session \
|
||||
--dest org.freedesktop.Notifications \
|
||||
--object-path /org/freedesktop/Notifications \
|
||||
|| exit 1
|
||||
|
||||
kill $(cat /tmp/notify-service.pid)
|
||||
pixi run pytest -s \"$TEST_PATH\" $PYTEST_ARGS
|
||||
kill \$SERVICE_PID
|
||||
"
|
||||
fi >> outputs/full-output.log 2>&1
|
||||
|
||||
|
||||
|
||||
echo "▶️ END"
|
||||
cat outputs/full-output.log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user