Skip to content

Commit 8811e96

Browse files
authored
CI Cleanup (#1023)
* ci cleanup * fix spelling * bump min builder * reinstate rtd stuff * bump min pytest * bump min pytest
1 parent 1235f2b commit 8811e96

File tree

4 files changed

+25
-46
lines changed

4 files changed

+25
-46
lines changed

.github/workflows/prep-release.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
branch:
1010
description: "The branch to target"
1111
required: false
12+
post_version_spec:
13+
description: "Post Version Specifier"
14+
required: false
1215
since:
1316
description: "Use PRs with activity since this date or git reference"
1417
required: false
@@ -18,33 +21,24 @@ on:
1821
type: boolean
1922
jobs:
2023
prep_release:
24+
permissions:
25+
contents: write
2126
runs-on: ubuntu-latest
22-
strategy:
23-
fail-fast: true
24-
matrix:
25-
python-version: ["3.10"]
2627
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v2
29-
30-
- name: Setup
31-
uses: jupyter-server/jupyter-releaser/.github/actions/common@v2
28+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
3229

3330
- name: Prep Release
3431
id: prep-release
35-
uses: jupyter-server/jupyter-releaser/.github/actions/prep-release@v2
32+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
3633
with:
37-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
34+
token: ${{ secrets.GITHUB_TOKEN }}
3835
version_spec: ${{ github.event.inputs.version_spec }}
3936
post_version_spec: ${{ github.event.inputs.post_version_spec }}
40-
target: ${{ github.repository }}
37+
target: ${{ github.event.inputs.target }}
4138
branch: ${{ github.event.inputs.branch }}
4239
since: ${{ github.event.inputs.since }}
4340
since_last_stable: ${{ github.event.inputs.since_last_stable }}
4441

4542
- name: "** Next Step **"
4643
run: |
4744
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
48-
echo "## Next Step" >> $GITHUB_STEP_SUMMARY
49-
echo "(Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}" >> $GITHUB_STEP_SUMMARY
50-
echo "Run Publish Release Workflow" >> $GITHUB_STEP_SUMMARY

.github/workflows/publish-release.yml

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@ on:
1515
jobs:
1616
publish_release:
1717
runs-on: ubuntu-latest
18-
strategy:
19-
fail-fast: true
20-
matrix:
21-
python-version: ["3.10"]
18+
permissions:
19+
contents: write
2220
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v2
25-
26-
- name: Setup
27-
uses: jupyter-server/jupyter-releaser/.github/actions/common@v2
21+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2822

2923
- name: Populate Release
3024
id: populate-release
31-
uses: jupyter-server/jupyter-releaser/.github/actions/populate-release@v2
25+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
3226
with:
33-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
34-
target: ${{ github.repository }}
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
target: ${{ github.event.inputs.target }}
3529
branch: ${{ github.event.inputs.branch }}
3630
release_url: ${{ github.event.inputs.release_url }}
3731
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
@@ -40,34 +34,23 @@ jobs:
4034
id: finalize-release
4135
env:
4236
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
37+
PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }}
4338
TWINE_USERNAME: __token__
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4440
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
4541
with:
46-
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
47-
target: ${{ github.repository }}
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
target: ${{ github.event.inputs.target }}
4844
release_url: ${{ steps.populate-release.outputs.release_url }}
4945

5046
- name: "** Next Step **"
5147
if: ${{ success() }}
5248
run: |
5349
echo "Verify the final release"
5450
echo ${{ steps.finalize-release.outputs.release_url }}
55-
echo "## Next Step" >> $GITHUB_STEP_SUMMARY
56-
echo "Verify the final release" >> $GITHUB_STEP_SUMMARY
57-
echo ${{ steps.finalize-release.outputs.release_url }} >> $GITHUB_STEP_SUMMARY
58-
if [ ! -z "${{ steps.finalize-release.outputs.pr_url }}" ]; then
59-
echo "Merge the forwardport PR"
60-
echo ${{ steps.finalize-release.outputs.pr_url }}
61-
echo "Merge the forwardport PR" >> $GITHUB_STEP_SUMMARY
62-
echo ${{ steps.finalize-release.outputs.pr_url }} >> $GITHUB_STEP_SUMMARY
63-
fi
6451
6552
- name: "** Failure Message **"
6653
if: ${{ failure() }}
6754
run: |
6855
echo "Failed to Publish the Draft Release Url:"
6956
echo ${{ steps.populate-release.outputs.release_url }}
70-
echo "## Failure Message" >> $GITHUB_STEP_SUMMARY
71-
echo ":x: Failed to Publish the Draft Release Url:" >> $GITHUB_STEP_SUMMARY
72-
echo ${{ steps.populate-release.outputs.release_url }} >> $GITHUB_STEP_SUMMARY
73-
echo "Fix credentials and run 'Publish Release' workflow again" >> $GITHUB_STEP_SUMMARY

jupyter_server/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import List
77

88
# Version string must appear intact for automatic versioning
9-
__version__ = "2.0.0rc1"
9+
__version__ = "2.0.0.dev0"
1010

1111
# Build up version_info tuple for backwards compatibility
1212
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test = [
6060
"pytest-console-scripts",
6161
"pytest-timeout",
6262
"pytest-tornasync",
63-
"pytest>=6.0",
63+
"pytest>=7.0",
6464
"requests",
6565
"pre-commit"
6666
]
@@ -108,18 +108,20 @@ test = "python -m pytest $ARGS --cov-fail-under 70 {args}"
108108

109109
[tool.hatch.version]
110110
path = "jupyter_server/_version.py"
111+
validate-bump = false
111112

112113
[tool.hatch.build]
113114
artifacts = ["jupyter_server/static/style"]
114115

115116
[tool.hatch.build.hooks.jupyter-builder]
116-
dependencies = ["hatch-jupyter-builder>=0.7.1"]
117+
dependencies = ["hatch-jupyter-builder>=0.8"]
117118
build-function = "hatch_jupyter_builder.npm_builder"
118119
ensured-targets = [
119120
"jupyter_server/static/style/bootstrap.min.css",
120121
"jupyter_server/static/style/bootstrap-theme.min.css"
121122
]
122123
install-pre-commit-hook = true
124+
optional-editable-build = true
123125

124126
[tool.black]
125127
line_length = 100
@@ -152,7 +154,7 @@ before-build-python = ["npm install", "npm run build"]
152154

153155
[tool.jupyter-releaser.options]
154156
pydist_resource_paths = ["jupyter_server/static/style/bootstrap.min.css", "jupyter_server/static/style/bootstrap-theme.min.css"]
155-
157+
post-version-spec = "dev"
156158

157159
[tool.mypy]
158160
check_untyped_defs = true

0 commit comments

Comments
 (0)