Skip to content

Adding integration test with jupyter_cassini #71

Adding integration test with jupyter_cassini

Adding integration test with jupyter_cassini #71

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Build and Test
on:
push:
branches: [ "main", "*.*.*", "*.*.*-*" ]
pull_request:
branches: [ "main", "*.*.*", "*.*.*-*" ]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 cassini --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 cassini --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Check formatting with Black
run: |
poetry run black --check cassini
- name: Test with pytest
run: |
poetry run pytest --cov cassini --cov-report=xml
- name: Typecheck with mypy
run: |
poetry run mypy cassini
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
compat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: 0Hughman0/jupyter_cassini
path: jupyter_cassini
- name: check it's there
run: |
INSTALL_DIR = $(pwd)
echo $INSTALL_DIR
ls -R
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: setup pip/ poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
- name: Install jupyter_cassini
run: |
cd jupyter_cassini
python -m pip install -U "jupyterlab>=4.0.0,<5"
python -m pip install .[test]
- name: Install cassini
run: |
cd $INSTALL_DIR
poetry install
- name: run jupyter_cassini tests
run: |
cd jupyter_cassini
pytest -vv jupyter_cassini_server