Skip to content

Commit

Permalink
On GitHub Actions, run only the e2e tests that are reliable there (#2954
Browse files Browse the repository at this point in the history
)
  • Loading branch information
philrz authored Jan 8, 2024
1 parent 4ab7b5e commit 29d291d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/advance-zed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: GabrielBB/xvfb-action@v1
with:
options: -screen 0 1280x1024x24
run: yarn e2e
run: yarn e2e:ci
- uses: actions/upload-artifact@v2
if: failure() && steps.playwright.outcome == 'failure'
with:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run e2e tests

on:
workflow_dispatch:

jobs:
run-e2e-tests:
name: Run e2e tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-zui
- run: yarn lint
- run: yarn test
- run: yarn build
- name: End to end tests
id: playwright
uses: GabrielBB/xvfb-action@v1
with:
options: -screen 0 1280x1024x24
run: yarn e2e:ci
- uses: actions/upload-artifact@v2
if: failure() && steps.playwright.outcome == 'failure'
with:
name: artifacts-${{ matrix.os }}
path: |
run/playwright-itest
!run/**/SS
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"lint": "nx run-many -t lint --all --exclude zui-player",
"test": "nx run-many -t test --all --exclude zui-player --skip-nx-cache",
"start": "nx start zui",
"e2e": "NODE_ENV=production nx test zui-player"
"e2e": "NODE_ENV=production nx test zui-player",
"e2e:ci": "NODE_ENV=production nx ci zui-player"
},
"devDependencies": {
"@nx-go/nx-go": "^2.7.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/zui-player/ci.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const baseConfig = require('./playwright.config');

module.exports = {
...baseConfig,
/* This is the list of flaky tests to ignore when running on CI */
testIgnore: /(pool-loads|pool-groups|title-bar-buttons).spec/,
};
3 changes: 2 additions & 1 deletion packages/zui-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"private": true,
"main": "./index.ts",
"scripts": {
"test": "playwright test --config playwright.config.js"
"test": "playwright test -c playwright.config.js",
"ci": "playwright test -c ci.config.js"
},
"dependencies": {
"@playwright/test": "next",
Expand Down

0 comments on commit 29d291d

Please sign in to comment.