From 8395dfc57b2f1595233413aeda2f81b8e2795892 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Mon, 13 Nov 2023 14:08:18 +0100 Subject: [PATCH] moved some more workflows --- .../workflows/check-release.yml | 0 .../workflows/enforce-label.yml | 0 .../workflows/playwright-update.yml | 1 + .../workflows/prep-release.yml | 0 .../workflows/rtd-preview.yml | 0 lite/.github/workflows/build.yml | 212 ------------------ lite/.github/workflows/publish-release.yml | 54 ----- lite/.github/workflows/ui-tests.yml | 107 --------- 8 files changed, 1 insertion(+), 373 deletions(-) rename {lite/.github => .github}/workflows/check-release.yml (100%) rename {lite/.github => .github}/workflows/enforce-label.yml (100%) rename {lite/.github => .github}/workflows/playwright-update.yml (99%) rename {lite/.github => .github}/workflows/prep-release.yml (100%) rename {lite/.github => .github}/workflows/rtd-preview.yml (100%) delete mode 100644 lite/.github/workflows/build.yml delete mode 100644 lite/.github/workflows/publish-release.yml delete mode 100644 lite/.github/workflows/ui-tests.yml diff --git a/lite/.github/workflows/check-release.yml b/.github/workflows/check-release.yml similarity index 100% rename from lite/.github/workflows/check-release.yml rename to .github/workflows/check-release.yml diff --git a/lite/.github/workflows/enforce-label.yml b/.github/workflows/enforce-label.yml similarity index 100% rename from lite/.github/workflows/enforce-label.yml rename to .github/workflows/enforce-label.yml diff --git a/lite/.github/workflows/playwright-update.yml b/.github/workflows/playwright-update.yml similarity index 99% rename from lite/.github/workflows/playwright-update.yml rename to .github/workflows/playwright-update.yml index 47dd68d9..76d311bb 100644 --- a/lite/.github/workflows/playwright-update.yml +++ b/.github/workflows/playwright-update.yml @@ -50,6 +50,7 @@ jobs: - name: Install the test dependencies run: | + cd lite cd ui-tests jlpm jlpm build diff --git a/lite/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml similarity index 100% rename from lite/.github/workflows/prep-release.yml rename to .github/workflows/prep-release.yml diff --git a/lite/.github/workflows/rtd-preview.yml b/.github/workflows/rtd-preview.yml similarity index 100% rename from lite/.github/workflows/rtd-preview.yml rename to .github/workflows/rtd-preview.yml diff --git a/lite/.github/workflows/build.yml b/lite/.github/workflows/build.yml deleted file mode 100644 index b383894b..00000000 --- a/lite/.github/workflows/build.yml +++ /dev/null @@ -1,212 +0,0 @@ -name: Build - -on: - push: - branches: main - pull_request: - branches: '*' - -defaults: - run: - shell: bash -l {0} - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Lint - run: | - set -eux - jlpm - jlpm run build - jlpm run lint:check - - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Build the extension - run: | - set -eux - python -m build - - - name: Upload extension packages - uses: actions/upload-artifact@v3 - with: - name: jupyterlite-xeus-python-dist-${{ github.run_number }} - path: dist - if-no-files-found: error - - test_isolated: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - architecture: 'x64' - - uses: actions/download-artifact@v3 - with: - name: jupyterlite-xeus-python-dist-${{ github.run_number }} - - name: Install and Test - run: | - set -eux - # Remove NodeJS, twice to take care of system and locally installed node versions. - sudo rm -rf $(which node) - sudo rm -rf $(which node) - - pip install "jupyterlab>=4.0.0,<5" jupyterlite_xeus_python*.whl - - jupyter labextension list - jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK" - - python -m jupyterlab.browser_check --no-browser-test - - - python-tests-mamba-python: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v2 - with: - name: jupyterlite-xeus-python-dist-${{ github.run_number }} - path: ./dist - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Make sure the Mamba Python API is available - run: | - mamba install mamba - python -c "from mamba.api import create" - - - name: Install - run: pip install jupyterlite_xeus_python*.tar.gz - working-directory: dist - - - name: Run tests - run: pytest -rP test_xeus_python_env.py - working-directory: tests - - python-tests-mamba: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v2 - with: - name: jupyterlite-xeus-python-dist-${{ github.run_number }} - path: ./dist - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Install - run: pip install jupyterlite_xeus_python*.tar.gz - working-directory: dist - - - name: Run tests - run: pytest -rP test_xeus_python_env.py - working-directory: tests - - python-tests-micromamba: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v2 - with: - name: jupyterlite-xeus-python-dist-${{ github.run_number }} - path: ./dist - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Install - run: pip install jupyterlite_xeus_python*.tar.gz - working-directory: dist - - - name: Run tests - run: pytest -rP test_xeus_python_env.py - working-directory: tests - - python-tests-conda: - needs: build - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v2 - with: - name: jupyterlite-xeus-python-dist-${{ github.run_number }} - path: ./dist - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Install - run: pip install jupyterlite_xeus_python*.tar.gz - working-directory: dist - - - name: Run tests - run: pytest -rP test_xeus_python_env.py - working-directory: tests - - - check_links: - name: Check Links - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v3 - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 \ No newline at end of file diff --git a/lite/.github/workflows/publish-release.yml b/lite/.github/workflows/publish-release.yml deleted file mode 100644 index dbaaeaad..00000000 --- a/lite/.github/workflows/publish-release.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: "Step 2: Publish Release" -on: - workflow_dispatch: - inputs: - branch: - description: "The target branch" - required: false - release_url: - description: "The URL of the draft GitHub release" - required: false - steps_to_skip: - description: "Comma separated list of steps to skip" - required: false - -jobs: - publish_release: - runs-on: ubuntu-latest - steps: - - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - - name: Populate Release - id: populate-release - uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 - with: - token: ${{ secrets.ADMIN_GITHUB_TOKEN }} - target: ${{ github.event.inputs.target }} - branch: ${{ github.event.inputs.branch }} - release_url: ${{ github.event.inputs.release_url }} - steps_to_skip: ${{ github.event.inputs.steps_to_skip }} - - - name: Finalize Release - id: finalize-release - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }} - TWINE_USERNAME: __token__ - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2 - with: - token: ${{ secrets.ADMIN_GITHUB_TOKEN }} - target: ${{ github.event.inputs.target }} - release_url: ${{ steps.populate-release.outputs.release_url }} - - - name: "** Next Step **" - if: ${{ success() }} - run: | - echo "Verify the final release" - echo ${{ steps.finalize-release.outputs.release_url }} - - - name: "** Failure Message **" - if: ${{ failure() }} - run: | - echo "Failed to Publish the Draft Release Url:" - echo ${{ steps.populate-release.outputs.release_url }} diff --git a/lite/.github/workflows/ui-tests.yml b/lite/.github/workflows/ui-tests.yml deleted file mode 100644 index b7738545..00000000 --- a/lite/.github/workflows/ui-tests.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: UI Tests - -on: [push, pull_request] - -defaults: - run: - shell: bash -l {0} - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Conda environment with Micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: '1.5.1-0' - environment-file: environment.yml - cache-environment: true - - - name: Install jupyterlite-xeus-python - run: | - jlpm - jlpm run build - python -m pip install -v . - - - name: Build UI tests - run: | - cd ui-tests - jlpm - # Build the JupyterLite website - jlpm build - - - name: Upload the JupyterLite website - uses: actions/upload-artifact@v3 - with: - name: jupyterlite-xeus-python-ui-tests-app-${{ github.run_number }} - path: ./ui-tests/ui-tests-app - - ui-tests: - needs: [build] - name: Visual Regression - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - browser: [firefox, chromium] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v3 - with: - name: jupyterlite-xeus-python-ui-tests-app-${{ github.run_number }} - path: ./ui-tests/ui-tests-app - - - name: Base Setup - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - - name: Install dependencies and browser - run: | - # Install JupyterLab to get jlpm - python -m pip install jupyterlab~=4.0 - cd ui-tests - jlpm - jlpm playwright install ${{ matrix.browser }} --with-deps - - - name: Test - run: | - cd ui-tests - jlpm run test --browser ${{ matrix.browser }} - - - name: Upload Playwright Test assets - if: always() - uses: actions/upload-artifact@v3 - with: - name: jupyterlite-xeux-python-${{ matrix.browser }}-test-assets - path: | - ui-tests/test-results - - - name: Upload Playwright Test report - if: always() - uses: actions/upload-artifact@v3 - with: - name: jupyterlite-xeus-python-${{ matrix.browser }}-test-report - path: | - ui-tests/playwright-report - - - name: Update snapshots - if: failure() - run: | - cd ui-tests - # remove previous snapshots from other browser - jlpm run clean:snapshots - # generate new snapshots - jlpm run test:update --browser ${{ matrix.browser }} - - - name: Upload updated snapshots - if: failure() - uses: actions/upload-artifact@v3 - with: - name: jupyterlite-xeus-python-${{ matrix.browser }}-updated-snapshots - path: ui-tests/test