Skip to content

Commit b28b6ae

Browse files
fcollonvaljtpio
authored andcommitted
Switch to GitHub workflow
1 parent 4f15ffa commit b28b6ae

File tree

5 files changed

+138
-185
lines changed

5 files changed

+138
-185
lines changed

.github/workflows/build.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: master
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '12.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.7'
23+
architecture: 'x64'
24+
25+
- name: Setup pip cache
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: pip-3.7-${{ hashFiles('package.json') }}
30+
restore-keys: |
31+
pip-3.7-
32+
pip-
33+
34+
- name: Get npm cache directory
35+
id: npm-cache
36+
run: |
37+
echo "::set-output name=dir::$(npm config get cache)"
38+
- uses: actions/cache@v2
39+
with:
40+
path: ${{ steps.npm-cache.outputs.dir }}
41+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
42+
restore-keys: |
43+
${{ runner.os }}-node-
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install -U pip setuptools cookiecutter
48+
- name: Test the extension
49+
# env:
50+
# CHROME_BIN: chromium-browser
51+
run: |
52+
cookiecutter . --config-file tests/testconfig.yaml --no-input
53+
pushd jupyter-widget-testwidgets
54+
python -m pip install --upgrade -v -e ".[test, examples, docs]"
55+
npm run lint:check
56+
pytest
57+
npm run test:ci
58+
- name: Check docs can be build + links
59+
run: |
60+
pushd docs
61+
make html
62+
make linkcheck
63+
popd
64+
- name: Make a non-local install so the data_files get populated
65+
run: |
66+
pip uninstall -y jupyter_widget_testwidgets
67+
pip install .
68+
jupyter nbextension enable --py --sys-prefix jupyter_widget_testwidgets
69+
# Validate nbextension (enable does not use exit code):
70+
python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('jupyter_widget_testwidgets/extension') or 0)"
71+
pip install jupyterlab
72+
# Make sure our lab extension was installed.
73+
jupyter labextension list 2>&1 | grep -ie "jupyter-widget-testwidgets.*OK"
74+
# Make sure our lab extension can be linked.
75+
jupyter labextension link
76+

.travis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '12.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.7'
23+
architecture: 'x64'
24+
25+
- name: Setup pip cache
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: pip-3.7-${{ hashFiles('package.json') }}
30+
restore-keys: |
31+
pip-3.7-
32+
pip-
33+
34+
- name: Get npm cache directory
35+
id: npm-cache
36+
run: |
37+
echo "::set-output name=dir::$(npm config get cache)"
38+
- uses: actions/cache@v2
39+
with:
40+
path: ${{ steps.npm-cache.outputs.dir }}
41+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
42+
restore-keys: |
43+
${{ runner.os }}-node-
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install -U pip setuptools codecov
48+
npm install -g codecov
49+
- name: Test the extension
50+
run: |
51+
python -m pip install --upgrade -v -e ".[test, examples, docs]"
52+
npm run lint:check
53+
pytest
54+
npm run test:ci
55+
- name: Check docs can be build + links
56+
run: |
57+
pushd docs
58+
make html
59+
make linkcheck
60+
popd
61+
python -m pytest_check_links --links-ext=.md -o testpaths=. -o addopts=
62+

{{cookiecutter.github_project_name}}/.travis.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

{{cookiecutter.github_project_name}}/appveyor.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)