-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci refactor * add coverage config * cleanup * cleanup * cleanup * try again * try again * remove min version check * try to fix windows again * try again * try again * flake * debug * debug * fix pin * update minimums * bump min traitlets * bump min nbconvert * try again * add skip * use base setup dependency type
- Loading branch information
Showing
21 changed files
with
338 additions
and
372 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
# Set update schedule for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every weekday | ||
interval: "weekly" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,29 @@ on: | |
push: | ||
branches: ["main"] | ||
pull_request: | ||
schedule: | ||
- cron: "0 8 * * *" | ||
|
||
defaults: | ||
run: | ||
shell: bash -eux {0} | ||
|
||
jobs: | ||
pre_commit: | ||
name: pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1 | ||
|
||
pre-commit: | ||
name: Run pre-commit formatters and linters | ||
test_docs: | ||
name: Test Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: pre-commit/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- run: hatch run docs:build | ||
|
||
build: | ||
name: Build, test and code coverage | ||
|
@@ -25,57 +35,103 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [ '3.7', '3.8', '3.9', '3.10' ] | ||
python-version: [ '3.7', '3.8', '3.9', '3.10', "3.11" ] | ||
exclude: | ||
- os: windows-latest | ||
python-version: 3.8 | ||
- os: windows-latest | ||
python-version: 3.9 | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: '3.9' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- name: Run the tests | ||
run: hatch run cov:test || hatch run test:test --lf | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upload coverage to Codecov | ||
run: | | ||
pip install codecov coverage[toml] | ||
codecov | ||
- name: Install dependencies | ||
run: | | ||
pip install .[test] | ||
pip install coverage | ||
- name: Type check | ||
run: mypy nbclient | ||
test_minimum_versions: | ||
name: Test Minimum Versions | ||
timeout-minutes: 20 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
with: | ||
dependency_type: minimum | ||
- name: Run the unit tests | ||
run: | | ||
hatch run test:nowarn || hatch -v run test:nowarn --lf | ||
- name: Run the tests | ||
shell: bash | ||
run: | | ||
args="-vv --maxfail=2 --cov=nbclient --cov-report=xml -W always" | ||
pytest $args || pytest $arg --lf | ||
test_prereleases: | ||
name: Test Prereleases | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
with: | ||
dependency_type: pre | ||
- name: Run the tests | ||
run: | | ||
hatch run test:nowarn || hatch run test:nowarn --lf | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
env_vars: OS,PYTHON | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
make_sdist: | ||
name: Make SDist | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1 | ||
|
||
- name: Build documentation | ||
run: | | ||
pip install .[sphinx] | ||
cd docs | ||
make html SPHINXOPTS="-W" | ||
test_sdist: | ||
runs-on: ubuntu-latest | ||
needs: [make_sdist] | ||
name: Install from SDist and Test | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 | ||
with: | ||
package_spec: . | ||
test_command: hatch run test:test || hatch run test:test --lf | ||
|
||
check-links: | ||
check_links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | ||
|
||
check_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
- name: Check Release | ||
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
tests_check: # This job does nothing and is only used for the branch protection | ||
if: always() | ||
needs: | ||
- build | ||
- pre_commit | ||
- test_docs | ||
- test_minimum_versions | ||
- test_prereleases | ||
- check_links | ||
- check_release | ||
- test_sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ python: | |
- method: pip | ||
path: . | ||
extra_requirements: | ||
- sphinx | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.