diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d2cfef684..47e3624de 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,7 +32,7 @@ jobs: strategy: matrix: - os: [macos-latest, windows-latest] + os: [macos-latest, windows-latest, ubuntu-latest] steps: - uses: actions/checkout@v2 @@ -44,11 +44,17 @@ jobs: node-version: '16.x' - run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://git@github.com/ - run: npm ci - - run: npm run build:prod env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - - run: npx playwright test --retries 3 - env: + - run: npm run build:prod + - run: npx playwright install --with-deps chromium + - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run e2e:ci + if: matrix.os == 'ubuntu-latest' + env: + e2e: true + - run: npm run e2e:ci + if: matrix.os != 'ubuntu-latest' + env: e2e: true release: needs: [build-and-test] @@ -77,8 +83,8 @@ jobs: # If the commit is tagged with a version (e.g. "v1.0.0"), # release the app after building release: ${{ startsWith(github.ref, 'refs/tags/v') }} - - name: Archive production artifacts - uses: actions/upload-artifact@v3 - with: - name: dev-release - path: ./release/** + #- name: Archive production artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: dev-release + # path: ./release/** diff --git a/package.json b/package.json index 6acfb11b7..8fabb84da 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,8 @@ "electron:build:windows": "npm run build:prod && electron-builder build -w", "test": "jest", "test:watch": "jest --watch", - "e2e": "npm run build:electron && npx playwright test -c playwright.config.ts", + "e2e": "npm run build:electron && npx playwright test --retries 3", + "e2e:ci": "npx playwright test --retries 3", "e2e:debug": "npm run build:electron && PWDEBUG=1 npx playwright test -c e2e/playwright.config.ts e2e/ /", "e2e:html-report": "npm run build:electron && npm run e2e -- --reporter=html", "e2e:show-report": "npx playwright show-report",