Tests #924
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
name: Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
schedule: | |
- cron: "0 8 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.7", "3.10"] | |
include: | |
- os: windows-latest | |
python-version: "3.9" | |
- os: ubuntu-latest | |
python-version: "pypy-3.7" | |
- os: macos-latest | |
python-version: "3.8" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Run the tests | |
run: | | |
hatch run cov:test || hatch run test:test --lf | |
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 | |
coverage: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 | |
check_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Install Dependencies | |
run: | | |
pip install -e . | |
- name: Check Release | |
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
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 run test:nowarn --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 | |
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 | |
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 | |
check_links: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | |
jupyter_server_terminals: | |
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/downstream-test@v1 | |
with: | |
package_name: jupyter_server_terminals | |
test_lint: | |
name: Test Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Run Linters | |
run: | | |
hatch run typing:test | |
hatch run lint:style | |
pipx run interrogate -v . | |
pipx run doc8 --max-line-length=200 --ignore-path=doc/index.rst | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- run: hatch run docs:build | |
tests_check: # This job does nothing and is only used for the branch protection | |
if: always() | |
needs: | |
- coverage | |
- test_lint | |
- docs | |
- check_release | |
- jupyter_server_terminals | |
- test_minimum_versions | |
- test_prereleases | |
- check_links | |
- 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) }} |