Skip to content

Commit

Permalink
Merge pull request #5938 from kevin-bates/gh-actions
Browse files Browse the repository at this point in the history
Replace Travis and Appveyor with Github Actions
  • Loading branch information
Zsailer authored Jan 13, 2021
2 parents 3587148 + 364ac52 commit 1cb0c05
Show file tree
Hide file tree
Showing 12 changed files with 358 additions and 195 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docs Tests
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu]
python-version: [ '3.6' ]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install the Python dependencies
run: |
pip install -e .[test] codecov
pip install -r docs/doc-requirements.txt
wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb && sudo dpkg -i pandoc-1.19.1-1-amd64.deb
- name: List installed packages
run: |
pip freeze
pip check
- name: Run tests on documentation
run: |
EXIT_STATUS=0
make -C docs/ html || EXIT_STATUS=$?
pytest --nbval --current-env docs || EXIT_STATUS=$?
exit $EXIT_STATUS
61 changes: 61 additions & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Linux JS Tests

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
group: [notebook, base, services]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache pip on Linux
uses: actions/cache@v1
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt', 'setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools wheel
npm install
npm install -g [email protected] [email protected]
pip install .[test]
- name: Run Tests
run: |
python -m notebook.jstest ${{ matrix.group }}
53 changes: 53 additions & 0 deletions .github/workflows/python-nbconvert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# The NBConvert Service requires pandoc. Instead of testing
# Pandoc on every operating system (which should already be
# done in nbconvert directly), we'll only test these services
# on ubuntu where we can easily load Pandoc from a Github
# Actions docker image (this docker image is not on other
# operating systems).
name: NBConvert Service Tests
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.6' , '3.7', '3.8', '3.9' ]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Setup Pandoc
uses: r-lib/actions/setup-pandoc@v1
- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install the Python dependencies
run: |
pip install -e .[test]
- name: Run NBConvert Tests
run: |
pytest notebook/nbconvert/tests/
- name: Run NBConvert Service Tests
run: |
pytest notebook/services/nbconvert/tests/
53 changes: 53 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Python Tests
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: [ '3.6' , '3.7', '3.8', '3.9' ] # Windows 3.9 fails due to the pywinpty dependency not working
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel --user
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install the Python dependencies
run: |
pip install -e .[test] codecov
- name: List installed packages
run: |
pip freeze
pip check
- name: Run Server-side tests
run: |
pytest -vv --cov notebook --cov-branch --cov-report term-missing:skip-covered --ignore-glob=notebook/tests/selenium/* --ignore-glob=notebook/nbconvert/tests/* --ignore-glob=notebook/services/nbconvert/tests/*
- name: Run Integration Tests
run: |
pytest -v notebook/tests/test_notebookapp_integration.py --integration_tests
- name: Coverage
run: |
codecov
46 changes: 46 additions & 0 deletions .github/workflows/selenium.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Selenium Tests

on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
python-version: [ '3.6', '3.7', '3.8', '3.9' ]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Install JS
run: |
npm install
- name: Install Python dependencies
run: |
python -m pip install -U pip setuptools wheel
pip install --upgrade selenium
pip install pytest
pip install .[test]
- name: Run Tests
run: |
export JUPYTER_TEST_BROWSER=firefox
export MOZ_HEADLESS=1
pytest -sv notebook/tests/selenium
106 changes: 0 additions & 106 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 1cb0c05

Please sign in to comment.