diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 182782ca..8dd1669e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,6 +108,7 @@ jobs: working-directory: ./desktop env: TEST_APPLICATION_PATH: ${{ runner.temp }}\badger\Badger Desktop.exe + ELECTRON: "true" linear: needs: [test-e2e-server, test-desktop] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2870103e..9d7b0862 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -178,7 +178,7 @@ jobs: PLAYWRIGHT_HTML_REPORT: ${{ github.workspace }}/server/playwright-report - uses: actions/upload-artifact@v3 - if: always() + if: failure() with: name: playwright-report-server path: ./server/playwright-report/ @@ -187,10 +187,13 @@ jobs: test-e2e-desktop-standalone: timeout-minutes: 60 runs-on: ubuntu-latest + strategy: + matrix: + ELECTRON: [true, false] env: NODE_ENV: test E2E_TEST: "true" - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ matrix.ELECTRON == 'true' && 1 || 0 }} steps: - uses: actions/checkout@v4 - name: Use Node.js 18.x @@ -210,15 +213,21 @@ jobs: - name: Make logs folder run: mkdir -p ${{ runner.temp }}/logs + - uses: ./.github/steps/setup-playwright + with: + working-directory: ./server + if: matrix.ELECTRON == 'false' + - name: Run Playwright tests run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn ${{ runner.debug && 'test:e2e:debug' || 'test:e2e' }} --project standalone working-directory: ./desktop env: PLAYWRIGHT_HTML_REPORT: ${{ github.workspace }}/desktop/playwright-report BADGER_LOGS_PATH: ${{ runner.temp }}/logs + ELECTRON: ${{ matrix.ELECTRON }} - uses: actions/upload-artifact@v3 - if: always() + if: failure() with: name: playwright-report-desktop path: | @@ -297,9 +306,10 @@ jobs: env: PLAYWRIGHT_HTML_REPORT: ${{ github.workspace }}/desktop/playwright-report BADGER_LOGS_PATH: ${{ runner.temp }}/logs + ELECTRON: "true" - uses: actions/upload-artifact@v3 - if: always() + if: failure() with: name: playwright-report-desktop path: |