Skip to content

Commit dce8cd2

Browse files
committed
Use xvfb to run unit tests
1 parent 5c0a8e7 commit dce8cd2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
sudo apt-get update
24-
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev
24+
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev xvfb libxcb-cursor0
2525
shell: bash
2626
- name: Install Qt
2727
uses: jurplel/install-qt-action@v3
@@ -31,5 +31,5 @@ jobs:
3131
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
3232

3333
- name: Build
34-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
34+
run: xvfb-run cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
3535

.github/workflows/utests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
sudo apt-get update
24-
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev
24+
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev xvfb libxcb-cursor0
2525
shell: bash
2626
- name: Install Qt
2727
uses: jurplel/install-qt-action@v3
@@ -31,8 +31,8 @@ jobs:
3131
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSCRATCHCPPGUI_BUILD_UNIT_TESTS=ON
3232

3333
- name: Build
34-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
34+
run: xvfb-run cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
3535

3636
- name: Run unit tests
37-
run: ctest --test-dir build -V
37+
run: xvfb-run ctest --test-dir build -V
3838

0 commit comments

Comments
 (0)