Skip to content

Commit dc3299f

Browse files
committed
👷 CI: Install and launch IBus daemon for testing
1 parent e95fa26 commit dc3299f

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎.github/workflows/rust.yml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ jobs:
9292
sudo mkdir -p /run/user/$UID |
9393
sed -e s/UID/$UID/ -e s/PATH/path/ CI/dbus-session.conf > /tmp/dbus-session.conf
9494
sed -e s/UID/$UID/ -e s/PATH/abstract/ CI/dbus-session.conf > /tmp/dbus-session-abstract.conf
95-
sudo apt-get install -y dbus
95+
sudo apt-get update
96+
sudo apt-get install -y dbus ibus
9697
- uses: dtolnay/rust-toolchain@master
9798
with:
9899
toolchain: stable
@@ -101,16 +102,23 @@ jobs:
101102
- name: Build and Test
102103
run: |
103104
dbus-run-session --config-file /tmp/dbus-session-abstract.conf -- cargo --locked test --release --verbose -- basic_connection
104-
# All features except tokio.
105-
dbus-run-session --config-file /tmp/dbus-session.conf -- \
105+
# Start IBus daemon for testing
106+
dbus-run-session --config-file /tmp/dbus-session.conf -- sh -c '
107+
ibus-daemon -d --xim &
108+
IBUS_PID=$!
109+
sleep 2
110+
111+
# All features except tokio.
106112
cargo --locked test --release --verbose --features uuid,url,time,chrono,option-as-array,vsock,bus-impl \
107113
-- --skip fdpass_systemd
108-
# Test tokio support.
109-
dbus-run-session --config-file /tmp/dbus-session.conf -- \
114+
# Test tokio support.
110115
cargo --locked test --release --verbose --tests -p zbus --no-default-features \
111116
--features tokio-vsock -- --skip fdpass_systemd
112-
dbus-run-session --config-file /tmp/dbus-session.conf -- \
113117
cargo --locked test --release --verbose --doc --no-default-features connection::Connection::executor
118+
119+
# Stop IBus
120+
kill $IBUS_PID || true
121+
'
114122
# zvariant only with ostree tests (which implicitly enables `gvariant` feature too).
115123
cargo --locked t -p zvariant --features ostree-tests
116124

0 commit comments

Comments
 (0)