Skip to content

Commit 9875ab3

Browse files
committed
Reinstate Xvfb
1 parent 2805efc commit 9875ab3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/dotnetCi.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
BranchName: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
4040
BranchParam: ${{ github.event_name == 'pull_request' && 'sonar.pullrequest.branch' || 'sonar.branch.name' }}
4141
PullRequestParam: ${{ github.event_name == 'pull_request' && format('/d:sonar.pullrequest.key={0}', github.event.number) || '' }}
42-
42+
DISPLAY: :99
43+
4344
steps:
4445
- name: Checkout
4546
uses: actions/checkout@v4
@@ -69,6 +70,8 @@ jobs:
6970
distribution: 'zulu'
7071
- name: Install Google Chrome & dependencies
7172
uses: browser-actions/setup-chrome@v2
73+
- name: Start an Xvfb display so Chrome may run
74+
run: Xvfb -ac $DISPLAY -screen 0 1280x1024x16 &
7275

7376
# Environment setup pre-build
7477

@@ -135,6 +138,9 @@ jobs:
135138
- name: Stop SonarScanner
136139
run:
137140
dotnet sonarscanner end /d:sonar.token=${{ env.SonarCloudSecretKey }}
141+
- name: Gracefully stop Xvfb
142+
run: killall Xvfb
143+
continue-on-error: true
138144
- name: Upload .NET test results artifacts
139145
uses: actions/upload-artifact@v4
140146
with:

0 commit comments

Comments
 (0)