Skip to content

Commit

Permalink
Merge pull request #2656 from jasongrout/ghactions
Browse files Browse the repository at this point in the history
Initial github action configuration
  • Loading branch information
jasongrout authored Jan 2, 2020
2 parents bc6f754 + 4744f20 commit 41274b7
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 49 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/pythonpackage.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/testdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Docs

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.5
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{hashFiles('**/requirements.txt')}}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt-get install -y pandoc
python -m pip install --upgrade pip
pip install file://$PWD#egg=ipywidgets
pip install -r ./docs/requirements.txt
- name: Build docs
run: |
cd docs
make html
50 changes: 50 additions & 0 deletions .github/workflows/testjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test JS

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install dependencies
run: |
sudo apt-get install -y firefox
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install, build, integrity, test
run: |
yarn install
yarn run build
yarn run integrity
pushd packages/base
yarn run test:unit:firefox:headless
popd
pushd packages/controls
yarn run test:unit:firefox:headless
popd
pushd packages/html-manager
yarn run test:unit:firefox:headless
popd
# # TODO: This is erroring out with 'timeout waiting for widgets to render' on the before each hook
# pushd examples/web1
# yarn run test:firefox:headless
# popd
env:
CI: true
32 changes: 32 additions & 0 deletions .github/workflows/testpython.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test Python

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{hashFiles('**/requirements.txt')}}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install file://$PWD#egg=ipywidgets[test]
- name: Test with pytest
run: |
pip install pytest
pytest --cov=ipywidgets ipywidgets
27 changes: 27 additions & 0 deletions .github/workflows/testspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test Spec

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.5
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{hashFiles('**/requirements.txt')}}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install file://$PWD#egg=ipywidgets
- name: Compare spec with latest version
run: |
python ./packages/schema/generate-spec.py > spec.md
diff -u ./packages/schema/jupyterwidgetmodels.latest.md ./spec.md
3 changes: 2 additions & 1 deletion examples/web1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"test": "npm run test:firefox && npm run test:chrome",
"test:chrome": "npm run test:default",
"test:default": "karma start karma.config.js --log-level debug",
"test:firefox": "npm run test:default -- --browsers Firefox"
"test:firefox": "npm run test:default -- --browsers Firefox",
"test:firefox:headless": "npm run test:default -- --browsers=FirefoxHeadless"
},
"dependencies": {
"@jupyter-widgets/base": "^2.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome",
"test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug",
"test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox",
"test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless",
"test:unit:ie": "npm run test:unit:default -- --browsers=IE"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome",
"test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug",
"test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox",
"test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless",
"test:unit:ie": "npm run test:unit:default -- --browsers=IE"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/html-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"test:unit": "npm run test:unit:firefox && npm run test:unit:chrome",
"test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome",
"test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug --browsers=Firefox",
"test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox"
"test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox",
"test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless"
},
"dependencies": {
"@jupyter-widgets/base": "^2.0.2",
Expand Down

0 comments on commit 41274b7

Please sign in to comment.