From 31cf1e751935628b2ce8b88b7c00e5b53e9dcfd6 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 7 Nov 2023 11:40:05 -0600 Subject: [PATCH] Use jupyter releaser (#301) * Use jupyter releaser * fix check release action * clean up variables * add another flaky --- .github/workflows/check-release.yml | 25 +++++++++++++ .github/workflows/prep-release.yml | 41 +++++++++++++++++++++ .github/workflows/publish-release.yml | 52 +++++++++++++++++++++++++++ tests/test_client.py | 1 + 4 files changed, 119 insertions(+) create mode 100644 .github/workflows/check-release.yml create mode 100644 .github/workflows/prep-release.yml create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 0000000..6ba7fcd --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,25 @@ +name: Check Release +on: + push: + branches: ["*"] + pull_request: + branches: ["*"] + release: + types: [published] + schedule: + - cron: "0 0 * * *" + +jobs: + check_release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + shell: bash + run: | + pip install -e . + - name: Check Release + uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml new file mode 100644 index 0000000..6f09281 --- /dev/null +++ b/.github/workflows/prep-release.yml @@ -0,0 +1,41 @@ +name: "Step 1: Prep Release" +on: + workflow_dispatch: + inputs: + version_spec: + description: "New Version Specifier" + default: "next" + required: false + branch: + description: "The branch to target" + required: false + post_version_spec: + description: "Post Version Specifier" + required: false + since: + description: "Use PRs with activity since this date or git reference" + required: false + since_last_stable: + description: "Use PRs with activity since the last stable git tag" + required: false + type: boolean +jobs: + prep_release: + runs-on: ubuntu-latest + steps: + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Prep Release + id: prep-release + uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 + with: + token: ${{ secrets.ADMIN_GITHUB_TOKEN }} + version_spec: ${{ github.event.inputs.version_spec }} + post_version_spec: ${{ github.event.inputs.post_version_spec }} + branch: ${{ github.event.inputs.branch }} + since: ${{ github.event.inputs.since }} + since_last_stable: ${{ github.event.inputs.since_last_stable }} + + - name: "** Next Step **" + run: | + echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}" diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..e586804 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,52 @@ +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 + environment: release + permissions: + # This is useful if you want to use PyPI trusted publisher + # and NPM provenance + id-token: write + 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 }} + 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 + uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2 + with: + token: ${{ secrets.ADMIN_GITHUB_TOKEN }} + 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/tests/test_client.py b/tests/test_client.py index bca9698..2dc536f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -433,6 +433,7 @@ async def run_tasks(): assert filter_messages_on_error_output(captured.err) == "" +@flaky def test_many_async_parallel_notebooks(capfd): """Ensure that when many IPython kernels are run in parallel, nothing awful happens.