Skip to content

Commit bc61783

Browse files
ci/tests: Move dbus setup just before running tests
1 parent 0db0cdd commit bc61783

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

.github/workflows/CI.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,6 @@ jobs:
2222
- uses: actions/checkout@v5
2323
- uses: dtolnay/rust-toolchain@stable
2424

25-
- name: Setup D-Bus and Secret Service for local tests
26-
run: |
27-
sudo apt-get update
28-
sudo apt-get install -y gnome-keyring dbus-x11
29-
30-
# Start D-Bus session
31-
mkdir -p ~/.local/share/keyrings
32-
eval $(dbus-launch --sh-syntax)
33-
export DBUS_SESSION_BUS_ADDRESS
34-
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
35-
36-
# Initialize and unlock the default keyring
37-
printf '\n' | gnome-keyring-daemon --unlock --daemonize --login
38-
39-
# Give the service time to start
40-
sleep 3
4125
- name: Build client (async-std / native)
4226
run: |
4327
cargo build --manifest-path ./client/Cargo.toml --no-default-features --features async-std --features native_crypto
@@ -66,6 +50,23 @@ jobs:
6650
run: |
6751
cargo build --manifest-path ./portal/Cargo.toml
6852
53+
- name: Setup D-Bus and Secret Service for local tests
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get install -y gnome-keyring dbus-x11
57+
58+
# Start D-Bus session
59+
mkdir -p ~/.local/share/keyrings
60+
eval $(dbus-launch --sh-syntax)
61+
export DBUS_SESSION_BUS_ADDRESS
62+
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
63+
64+
# Initialize and unlock the default keyring
65+
printf '\n' | gnome-keyring-daemon --unlock --daemonize --login
66+
67+
# Give the service time to start
68+
sleep 3
69+
6970
- name: Test (native)
7071
run: |
7172
cargo test --manifest-path ./client/Cargo.toml --no-default-features --features tokio --features native_crypto,local_tests

0 commit comments

Comments
 (0)