Skip to content

Commit 48fb973

Browse files
authored
CI Cleanup (#6667)
* ci cleanup * lint * run ui tests on ubuntu 20.04
1 parent 22475a3 commit 48fb973

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches: ['main']
66
pull_request:
7+
schedule:
8+
- cron: "0 0 * * *"
79

810
permissions:
911
contents:

.github/workflows/ui-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
ui-tests:
2525
needs: [build]
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-20.04
2727
timeout-minutes: 20
2828
strategy:
2929
fail-fast: false

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: black
3030

3131
- repo: https://github.com/charliermarsh/ruff-pre-commit
32-
rev: v0.0.165
32+
rev: v0.0.185
3333
hooks:
3434
- id: ruff
3535
args: ["--fix"]

pyproject.toml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ dev = [
7474
"pre-commit",
7575
"hatch"
7676
]
77-
lint = [
78-
"black[jupyter]>=22.6.0",
79-
"mdformat>0.7",
80-
"mdformat-gfm>=0.3.5",
81-
"ruff>=0.0.156"
82-
]
83-
typing = ["mypy>=0.990"]
84-
8577

8678
[tool.hatch.version]
8779
path = "notebook/_version.py"
@@ -139,15 +131,22 @@ test = "python -m pytest -vv --cov notebook --cov-branch --cov-report term-missi
139131
nowarn = "test -W default {args}"
140132

141133
[tool.hatch.envs.typing]
142-
features = ["typing", "test"]
134+
features = ["test"]
135+
dependencies = ["mypy>=0.990"]
143136
[tool.hatch.envs.typing.scripts]
144137
test = "mypy --install-types --non-interactive {args:notebook tests}"
145138

146139
[tool.hatch.envs.lint]
147-
features = ["lint"]
140+
dependencies = [
141+
"black[jupyter]>=22.6.0",
142+
"mdformat>0.7",
143+
"mdformat-gfm>=0.3.5",
144+
"ruff>=0.0.156"
145+
]
146+
detached = true
148147
[tool.hatch.envs.lint.scripts]
149148
style = [
150-
"ruff {args:notebook}",
149+
"ruff {args:notebook tests ui-tests}",
151150
"black --check --diff {args:.}",
152151
"mdformat --check {args:CHANGELOG.md}"
153152
]

ui-tests/test/jupyter_server_config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
from typing import Any
33

44
c: Any
5-
c.ServerApp.port = 8888
6-
c.ServerApp.port_retries = 0
7-
c.ServerApp.open_browser = False
5+
c.ServerApp.port = 8888 # noqa
6+
c.ServerApp.port_retries = 0 # noqa
7+
c.ServerApp.open_browser = False # noqa
88

9-
c.ServerApp.root_dir = mkdtemp(prefix="galata-test-")
9+
c.ServerApp.root_dir = mkdtemp(prefix="galata-test-") # noqa
1010
c.ServerApp.token = "" # noqa
1111
c.ServerApp.password = "" # noqa
12-
c.ServerApp.disable_check_xsrf = True
12+
c.ServerApp.disable_check_xsrf = True # noqa
1313

14-
c.JupyterNotebookApp.expose_app_in_browser = True
14+
c.JupyterNotebookApp.expose_app_in_browser = True # noqa

0 commit comments

Comments
 (0)