-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from jtpio/github-actions
Switch to GitHub actions on CI
- Loading branch information
Showing
6 changed files
with
150 additions
and
186 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
architecture: 'x64' | ||
|
||
- name: Setup pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-3.7-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
pip-3.7- | ||
pip- | ||
- name: Get npm cache directory | ||
id: npm-cache | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.npm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip setuptools cookiecutter | ||
- name: Test the extension | ||
# env: | ||
# CHROME_BIN: chromium-browser | ||
run: | | ||
cookiecutter . --config-file tests/testconfig.yaml --no-input | ||
pushd jupyter-widget-testwidgets | ||
python -m pip install --upgrade -v -e ".[test, examples, docs]" | ||
npm run lint:check | ||
# TODO: re-enable tests | ||
# pytest | ||
# npm run test:ci | ||
# - name: Check docs can be build + links | ||
# run: | | ||
# pushd jupyter-widget-testwidgets/docs | ||
# make html | ||
# make linkcheck | ||
# popd | ||
|
||
- name: Make a non-local install so the data_files get populated | ||
run: | | ||
pip uninstall -y jupyter_widget_testwidgets | ||
cd jupyter-widget-testwidgets | ||
pip install . | ||
jupyter nbextension enable --py --sys-prefix jupyter_widget_testwidgets | ||
# Validate nbextension (enable does not use exit code): | ||
python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('jupyter_widget_testwidgets/extension') or 0)" | ||
pip install jupyterlab | ||
# Make sure our lab extension was installed. | ||
jupyter labextension list 2>&1 | grep -ie "jupyter-widget-testwidgets.*OK" | ||
# Make sure our lab extension can be linked. | ||
jupyter labextension link |
This file was deleted.
Oops, something went wrong.
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
62 changes: 62 additions & 0 deletions
62
{{cookiecutter.github_project_name}}/.github/workflows/build.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
architecture: 'x64' | ||
|
||
- name: Setup pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-3.7-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
pip-3.7- | ||
pip- | ||
- name: Get npm cache directory | ||
id: npm-cache | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.npm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip setuptools codecov | ||
npm install -g codecov | ||
- name: Test the extension | ||
run: | | ||
python -m pip install --upgrade -v -e ".[test, examples, docs]" | ||
npm run lint:check | ||
pytest | ||
npm run test:ci | ||
- name: Check docs can be build + links | ||
run: | | ||
pushd docs | ||
make html | ||
make linkcheck | ||
popd | ||
python -m pytest_check_links --links-ext=.md -o testpaths=. -o addopts= | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.