File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 9696 run : |
9797 sudo apt-get update --yes && sudo apt-get install --yes musl-tools gnome-keyring keyutils dbus-x11 libsecret-tools
9898 rm -f $HOME/.local/share/keyrings/*
99- eval $(dbus-launch --sh-syntax)
100- echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
101- eval $(echo -n "test" | gnome-keyring-daemon --unlock --components=secrets)
102- echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test warmup
10399 shell : bash
104100
105101 - name : Install cargo-llvm-cov
@@ -111,6 +107,15 @@ runs:
111107 - name : Build and test with coverage
112108 if : inputs.task == 'test'
113109 run : |
110+ # Start D-Bus and unlock keyring in the same shell that runs tests,
111+ # so daemons are guaranteed alive for the entire test execution.
112+ if [[ "$RUNNER_OS" == "Linux" ]]; then
113+ eval $(dbus-launch --sh-syntax)
114+ export DBUS_SESSION_BUS_ADDRESS
115+ eval $(echo -n "test" | gnome-keyring-daemon --unlock --components=secrets)
116+ echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test warmup
117+ fi
118+
114119 source <(cargo llvm-cov show-env --export-prefix)
115120
116121 bins_start=$(date +%s)
Original file line number Diff line number Diff line change @@ -190,10 +190,6 @@ jobs:
190190 sudo apt-get update --yes
191191 sudo apt-get install --yes gnome-keyring keyutils dbus-x11 libsecret-tools
192192 rm -f $HOME/.local/share/keyrings/*
193- eval $(dbus-launch --sh-syntax)
194- echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
195- eval $(echo -n "test" | gnome-keyring-daemon --unlock --components=secrets)
196- echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test warmup
197193
198194 - name : Setup Rust with cache
199195 uses : ./.github/actions/utils/setup-rust-with-cache
@@ -207,6 +203,13 @@ jobs:
207203
208204 - name : Build and test with coverage
209205 run : |
206+ # Start D-Bus and unlock keyring in the same shell that runs tests,
207+ # so daemons are guaranteed alive for the entire test execution.
208+ eval $(dbus-launch --sh-syntax)
209+ export DBUS_SESSION_BUS_ADDRESS
210+ eval $(echo -n "test" | gnome-keyring-daemon --unlock --components=secrets)
211+ echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test warmup
212+
210213 source <(cargo llvm-cov show-env --export-prefix)
211214 cargo build --locked
212215 cargo test --locked --no-run
You can’t perform that action at this time.
0 commit comments