Skip to content

Commit c2a2047

Browse files
author
Mohammod Al Amin Ashik
committed
test
1 parent 9c528e6 commit c2a2047

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ jobs:
227227
outputs:
228228
run_e2e: ${{ steps.check.outputs.should_run }}
229229
steps:
230+
- uses: actions/checkout@v4
230231
- name: Check if e2e-desktop should run
231232
id: check
232233
uses: ./.github/actions/check-comment-trigger
@@ -240,7 +241,7 @@ jobs:
240241
# Runs when: main branch, [e2e] in commit, or /e2e-desktop comment on PR
241242
# ─────────────────────────────────────────────────────────────
242243
e2e-desktop:
243-
needs: [build, e2e-trigger-check]
244+
needs: [e2e-trigger-check]
244245
if: needs.e2e-trigger-check.outputs.run_e2e == 'true'
245246
uses: ./.github/workflows/e2e-desktop.yml
246247
with:

.github/workflows/e2e-desktop-comment.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,20 @@ jobs:
2121
steps:
2222
- name: Check comment trigger
2323
id: check
24-
uses: ./.github/actions/check-comment-trigger
24+
uses: actions/github-script@v7
2525
with:
26-
trigger: '/e2e-desktop'
27-
allow_workflow_dispatch: 'true'
26+
script: |
27+
const trigger = '/e2e-desktop';
28+
if (context.eventName === 'workflow_dispatch') {
29+
core.setOutput('should_run', 'true');
30+
return;
31+
}
32+
if (context.eventName === 'issue_comment' && context.payload.issue?.pull_request) {
33+
const body = context.payload.comment?.body || '';
34+
core.setOutput('should_run', body.includes(trigger) ? 'true' : 'false');
35+
return;
36+
}
37+
core.setOutput('should_run', 'false');
2838
2939
get-pr-ref:
3040
needs: check-trigger

.github/workflows/e2e-desktop.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ jobs:
7777
- name: Run desktop E2E tests (Linux)
7878
if: matrix.os == 'ubuntu-latest'
7979
run: |
80-
dbus-run-session -- bash -c 'gnome-keyring-daemon --unlock < /dev/null; sleep 2; xvfb-run --auto-servernum pnpm test:e2e'
80+
# Start dbus session and unlock gnome-keyring with a dummy password for CI
81+
dbus-run-session -- bash -c '
82+
echo "test" | gnome-keyring-daemon --unlock --components=secrets
83+
export $(gnome-keyring-daemon --start --components=secrets)
84+
sleep 1
85+
xvfb-run --auto-servernum pnpm test:e2e
86+
'
8187
8288
- name: Run desktop E2E tests (Windows)
8389
if: matrix.os == 'windows-latest'

0 commit comments

Comments
 (0)