CI Cleanup (#6667)

* ci cleanup

* lint

* run ui tests on ubuntu 20.04
This commit is contained in:
Steven Silvester 2022-12-19 07:37:55 -06:00 committed by GitHub
parent 22475a39ab
commit 48fb973071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 19 deletions

View File

@ -4,6 +4,8 @@ on:
push:
branches: ['main']
pull_request:
schedule:
- cron: "0 0 * * *"
permissions:
contents:

View File

@ -23,7 +23,7 @@ jobs:
ui-tests:
needs: [build]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false

View File

@ -29,7 +29,7 @@ repos:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.165
rev: v0.0.185
hooks:
- id: ruff
args: ["--fix"]

View File

@ -74,14 +74,6 @@ dev = [
"pre-commit",
"hatch"
]
lint = [
"black[jupyter]>=22.6.0",
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff>=0.0.156"
]
typing = ["mypy>=0.990"]
[tool.hatch.version]
path = "notebook/_version.py"
@ -139,15 +131,22 @@ test = "python -m pytest -vv --cov notebook --cov-branch --cov-report term-missi
nowarn = "test -W default {args}"
[tool.hatch.envs.typing]
features = ["typing", "test"]
features = ["test"]
dependencies = ["mypy>=0.990"]
[tool.hatch.envs.typing.scripts]
test = "mypy --install-types --non-interactive {args:notebook tests}"
[tool.hatch.envs.lint]
features = ["lint"]
dependencies = [
"black[jupyter]>=22.6.0",
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff>=0.0.156"
]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
"ruff {args:notebook}",
"ruff {args:notebook tests ui-tests}",
"black --check --diff {args:.}",
"mdformat --check {args:CHANGELOG.md}"
]

View File

@ -2,13 +2,13 @@ from tempfile import mkdtemp
from typing import Any
c: Any
c.ServerApp.port = 8888
c.ServerApp.port_retries = 0
c.ServerApp.open_browser = False
c.ServerApp.port = 8888 # noqa
c.ServerApp.port_retries = 0 # noqa
c.ServerApp.open_browser = False # noqa
c.ServerApp.root_dir = mkdtemp(prefix="galata-test-")
c.ServerApp.root_dir = mkdtemp(prefix="galata-test-") # noqa
c.ServerApp.token = "" # noqa
c.ServerApp.password = "" # noqa
c.ServerApp.disable_check_xsrf = True
c.ServerApp.disable_check_xsrf = True # noqa
c.JupyterNotebookApp.expose_app_in_browser = True
c.JupyterNotebookApp.expose_app_in_browser = True # noqa