Skip to content

Commit

Permalink
CI Cleanup (#6667)
Browse files Browse the repository at this point in the history
* ci cleanup

* lint

* run ui tests on ubuntu 20.04
  • Loading branch information
blink1073 authored Dec 19, 2022
1 parent 22475a3 commit 48fb973
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: ['main']
pull_request:
schedule:
- cron: "0 0 * * *"

permissions:
contents:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
21 changes: 10 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}"
]
Expand Down
12 changes: 6 additions & 6 deletions ui-tests/test/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
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

0 comments on commit 48fb973

Please sign in to comment.