-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.x] Fix CI, run lint, reduce end-to-end tests flakiness (#425)
* modify the commit for 1.x * Fix CI, run lint, reduce end-to-end tests flakiness (#417) * add macos tests * add locally-generated snapshots * check if filebrowser is already open before opening it * add actual snapshoy from CI * Update Playwright Snapshots * use notebook toolbar, mask bttns on the right * correct selector * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * run lint * Update Playwright Snapshots * timestampLocator -> timestamp * wait until fonts are ready before taking a snapshot * add maxDiffPixels * Revert "wait until fonts are ready before taking a snapshot" This reverts commit 9554559. * pin jupyterlab version for e2e tests and snapshots * remove macos tests * rename relevant job to end-to-end test * remove darwin/macos snapshots * specify jupyterlab version correctly * run lint * add jlpm install to Lint the extension step * remove ubuntu postfix from test report * Make e2e tests a separate file * add build steps * pin version of jupyterlab in e2e test file * introduce modifyListResponse, remove maxDiffPixels * modifyListResponse -> setJobList * set expected URL * always set create_time to 1 * update list view snapshot * run check option for lint * run lint locally --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix install chromium command * remove playwrght from dev dependencies * fix comma * Roll back 402 changes * roll back changes to build.yml * run lint * update snapshots * remove integration step * reinstate d423ede --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
73ee948
commit 3efcbb4
Showing
17 changed files
with
342 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: E2E Tests | ||
|
||
# suppress warning raised by https://github.com/jupyter/jupyter_core/pull/292 | ||
env: | ||
JUPYTER_PLATFORM_DIRS: '1' | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: '*' | ||
|
||
jobs: | ||
e2e-tests: | ||
name: Linux | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Install extension dependencies | ||
run: python -m pip install -U jupyterlab~=3.1 | ||
|
||
- name: Build the extension | ||
run: | | ||
set -eux | ||
python -m pip install . | ||
jupyter server extension list | ||
jupyter server extension list 2>&1 | grep -ie "jupyter_scheduler.*OK" | ||
jupyter labextension list | ||
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/scheduler.*OK" | ||
python -m jupyterlab.browser_check | ||
- name: Install ui-tests dependencies | ||
working-directory: ui-tests | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
run: jlpm install | ||
|
||
- name: Set up browser cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ github.workspace }}/pw-browsers | ||
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }} | ||
|
||
- name: Install browser | ||
working-directory: ui-tests | ||
run: jlpm playwright install chromium | ||
|
||
- name: Execute integration tests | ||
working-directory: ui-tests | ||
run: jlpm test | ||
|
||
- name: Upload Playwright Test report | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jupyter_scheduler-playwright-tests-linux | ||
path: | | ||
ui-tests/test-results | ||
ui-tests/playwright-report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.