Konstantinos Kaloutas 2 years ago
parent
commit
a30a308ed0
2 changed files with 17 additions and 11 deletions
  1. 9 6
      .github/workflows/build.yml
  2. 8 5
      .github/workflows/e2e.yml

+ 9 - 6
.github/workflows/build.yml

@@ -182,21 +182,24 @@ jobs:
       - name: Ensure static yarn.lock is up to date
         run: git diff --exit-code static/yarn.lock
 
-      - name: Install fluxbox
-        run: sudo apt-get update && sudo apt-get install -y fluxbox
-
       - name: Export display
-        run: export DISPLAY=:99
+        run: export DISPLAY=:1
+
+      - name: Start XVFB
+        run: Xvfb $DISPLAY -screen 0 1024x768x16
+
+      - name: Install and start fluxbox
+        run: sudo apt-get update && sudo apt-get install -y fluxbox && fluxbox
 
       - name: Run Playwright test - 1/2
-        run: Xvfb :99 -screen 0 1024x768x16 & fluxbox & npx playwright test --reporter github --shard=1/2
+        run: xvfb-run -- npx playwright test --reporter github --shard=1/2
         env:
           LOGSEQ_CI: true
           DEBUG: "pw:api"
           RELEASE: true # skip dev only test
 
       - name: Run Playwright test - 2/2
-        run: Xvfb :99 -screen 0 1024x768x16 & fluxbox & npx playwright test --reporter github --shard=2/2
+        run: xvfb-run -- npx playwright test --reporter github --shard=2/2
         env:
           LOGSEQ_CI: true
           DEBUG: "pw:api"

+ 8 - 5
.github/workflows/e2e.yml

@@ -137,14 +137,17 @@ jobs:
       - name: Ensure static yarn.lock is up to date
         run: git diff --exit-code static/yarn.lock
 
-      - name: Install fluxbox
-        run: sudo apt-get update && sudo apt-get install -y fluxbox
-
       - name: Export display
-        run: export DISPLAY=:99
+        run: export DISPLAY=:1
+
+      - name: Start XVFB
+        run: Xvfb $DISPLAY -screen 0 1024x768x16
+
+      - name: Install and start fluxbox
+        run: sudo apt-get update && sudo apt-get install -y fluxbox && fluxbox
 
       - name: Run Playwright test
-        run: Xvfb :99 -screen 0 1024x768x16 & fluxbox & npx playwright test --reporter github --shard=${{ matrix.shard }}/3
+        run: xvfb-run -- npx playwright test --reporter github --shard=${{ matrix.shard }}/3
         env:
           LOGSEQ_CI: true
           DEBUG: "pw:api"