Skip to content

Commit 376a532

Browse files
authored
Fix CI: remove duplicate jobs (check release and check link), detect typescript build issues early (jupyterlab#94)
* revert-unrelated-changes * lint * cleanup-ci * remove-duplicated-check-release * run with coverage * ignore-coverage-for-now * ignore-coverage
1 parent 4c11515 commit 376a532

2 files changed

Lines changed: 64 additions & 97 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,65 @@ defaults:
1515

1616
jobs:
1717
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6
23+
24+
- name: Base Setup
25+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
26+
27+
- name: Install dependencies
28+
run: python -m pip install .[test]
29+
30+
- name: Lint the extension
31+
run: |
32+
set -eux
33+
jlpm
34+
jlpm run lint:check
35+
36+
- name: Build the extension
37+
run: |
38+
set -eux
39+
jlpm
40+
jlpm run build
41+
42+
- name: Package the extension
43+
run: |
44+
set -eux
45+
46+
pip install build
47+
python -m build
48+
49+
- name: Upload extension packages
50+
uses: actions/upload-artifact@v6
51+
with:
52+
name: extension-artifacts
53+
path: dist/jupyter_builder*
54+
if-no-files-found: error
55+
56+
test_isolated:
57+
needs: build
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- name: Install Python
62+
uses: actions/setup-python@v6
63+
with:
64+
python-version: '3.10'
65+
architecture: 'x64'
66+
- uses: actions/download-artifact@v7
67+
with:
68+
name: extension-artifacts
69+
- name: Install and Test
70+
run: |
71+
set -eux
72+
pip install jupyter_builder*.whl
73+
jupyter-builder --version
74+
jlpm --version
75+
76+
test:
1877
runs-on: ${{ matrix.os }}
1978
timeout-minutes: 20
2079
strategy:
@@ -33,7 +92,7 @@ jobs:
3392
-
3493
run: pip install -e ".[test,dev]"
3594
- name: Run the tests
36-
run: pytest
95+
run: pytest --cov
3796
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
3897

3998
test_lint:
@@ -47,7 +106,6 @@ jobs:
47106
- name: Run Linters
48107
run: |
49108
python -m pre_commit run --all
50-
# FIXME Nice to activate in the future
51109
# pipx run interrogate -v .
52110
53111
test_minimum_versions:
@@ -101,21 +159,6 @@ jobs:
101159
package_spec: -vv .[test]
102160
test_command: pytest
103161

104-
check_release:
105-
runs-on: ubuntu-latest
106-
steps:
107-
- name: Checkout
108-
uses: actions/checkout@v6
109-
- name: Base Setup
110-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
111-
- name: Install Dependencies
112-
run: |
113-
pip install -e .
114-
- name: Check Release
115-
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
116-
with:
117-
token: ${{ secrets.GITHUB_TOKEN }}
118-
119162
check_links:
120163
name: Check Links
121164
runs-on: ubuntu-latest
@@ -125,11 +168,10 @@ jobs:
125168
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
126169
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
127170

128-
# FIXME to activate later
129171
# coverage:
130172
# runs-on: ubuntu-latest
131173
# needs:
132-
# - build
174+
# - test
133175
# steps:
134176
# - uses: actions/checkout@v6
135177
# - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
@@ -139,12 +181,13 @@ jobs:
139181
tests_check: # This job does nothing and is only used for the branch protection
140182
if: always()
141183
needs:
142-
# - coverage
184+
- test_isolated
185+
- test
186+
- build
143187
- test_lint
144188
- test_minimum_versions
145189
- test_prereleases
146190
- check_links
147-
- check_release
148191
- test_sdist
149192
runs-on: ubuntu-latest
150193
steps:

0 commit comments

Comments
 (0)