Improve Coverage Accuracy and Speed Up Tests #163
Workflow file for this run
This file contains hidden or 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
| name: Downstream Tests | |
| on: | |
| pull_request: | |
| jobs: | |
| downstream: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - repo: jupyterlab/jupyterlab | |
| name: jupyterlab | |
| - repo: jupyter/notebook | |
| name: notebook | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Base Setup | |
| uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
| - name: Install Builder | |
| run: | | |
| pip install hatchling>=1.21.1 | |
| python -m pip install . | |
| - name: Install dependencies | |
| run: jlpm install | |
| - name: Build TypeScript | |
| run: jlpm build:prod | |
| - name: Pack npm tarball | |
| run: npm pack | |
| - name: Checkout ${{ matrix.name }} | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: ${{ matrix.repo }} | |
| path: downstream | |
| - name: Patch root package.json resolutions | |
| run: | | |
| TARBALL=$(realpath jupyter-builder-*.tgz) | |
| echo "Using tarball: $TARBALL" | |
| jq --arg t "file:$TARBALL" \ | |
| '.resolutions["@jupyter/builder"] = $t' \ | |
| downstream/package.json > tmp.json && mv tmp.json downstream/package.json | |
| echo "--- Patched resolution ---" | |
| jq '.resolutions["@jupyter/builder"]' downstream/package.json | |
| - name: Install deps | |
| working-directory: downstream | |
| run: YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm install | |
| - name: Test `jlpm workspaces foreach` command | |
| working-directory: downstream | |
| continue-on-error: true | |
| run: | | |
| jlpm workspaces foreach --parallel exec sh -c 'echo Hello from $PWD' | |
| - name: Build ${{ matrix.name }} | |
| working-directory: downstream | |
| run: jlpm build | |
| - name: Build wheel | |
| working-directory: downstream | |
| run: | | |
| pip install build | |
| python -m build --wheel | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.name }}-wheel | |
| path: downstream/dist/*.whl | |
| if-no-files-found: error |