Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up workflow and pyproject #884

Merged
merged 4 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 19 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

check-links:
check_links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -61,56 +61,52 @@ jobs:
- name: Run the tests on pypy
if: ${{ startsWith(matrix.python-version, 'pypy') }}
run: |
hatch run test:test -W default || hatch run test:test -W default --lf
hatch run test:nowarn || hatch run test:nowarn --lf
- name: Run the tests on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
hatch run cov:test -W default || hatch run test:test -W default --lf
hatch run cov:nowarn || hatch run test:nowarn --lf
- name: Code coverage
run: |
pip install codecov
codecov

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- run: hatch run docs:build

test_miniumum_verisons:
test_minimum_verisons:
blink1073 marked this conversation as resolved.
Show resolved Hide resolved
name: Test Minimum Versions
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python_version: "3.8"
- name: Install miniumum versions
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
- uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
with:
only_create_file: 1
- name: Run the unit tests
run: pytest -vv -W default || pytest -vv -W default --lf
run: |
export PIP_CONSTRAINT="./contraints_file.txt"
hatch run test:nowarn || hatch run test:nowarn --lf

test_prereleases:
name: Test Prereleases
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install the Python dependencies
run: |
pip install --upgrade --upgrade-strategy eager --pre -e ".[test]"
- name: List installed packages
run: |
pip freeze
pip check
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run the tests
run: |
pytest -vv -W default || pytest -vv -W default --lf
export PIP_PRE=1
hatch run test:nowarn || hatch run test:nowarn --lf

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
Expand All @@ -136,8 +132,8 @@ jobs:
needs:
- test
- docs
- check-links
- test_miniumum_verisons
- check_links
- test_minimum_verisons
blink1073 marked this conversation as resolved.
Show resolved Hide resolved
- pre-commit
- test_prereleases
- test_sdist
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies = [
"python-dateutil>=2.8.2",
"pyzmq>=23.0",
"tornado>=6.2",
"traitlets",
"traitlets>=5.3",
]

[[project.authors]]
Expand Down Expand Up @@ -97,15 +97,16 @@ dependencies = ["coverage", "pytest-cov"]
ARGS = "-vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered"
[tool.hatch.envs.cov.scripts]
test = "python -m pytest $ARGS {args}"
nowarn = "python -m pytest $ARGS -W default {args}"

[tool.black]
line-length = 100
skip-string-normalization = true
target_version = [
"py37",
"py38",
"py39",
"py310",
"py311",
]

[tool.pytest.ini_options]
Expand Down