Skip to content

Commit

Permalink
Merge pull request #603 from vidartf/fix-build
Browse files Browse the repository at this point in the history
Fix the dev build
  • Loading branch information
vidartf committed Sep 30, 2021
2 parents a74b538 + b283d49 commit 559d785
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 4 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Test

on: [push, pull_request]

jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- 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
python -m pip install file://$PWD#egg=ipywidgets
python -m pip install -r ./docs/requirements.txt
- name: Build docs
run: |
cd docs
make html
js:
name: JavaScript
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: actions/cache@v2
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
python -m pip install jupyterlab~=3.0
npm install -g codecov
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: install, build, test
run: |
python -m pip install --upgrade --upgrade-strategy=eager -e ".[test]"
npm test
env:
CI: true
python:
name: Python
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- 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 codecov
python -m pip install --upgrade pip
python -m pip install jupyterlab~=3.0
python -m pip install --upgrade --upgrade-strategy=eager ".[test]"
- name: Test with pytest
run: |
git config --global user.email CI@fake.com
git config --global user.name "CI"
pytest --cov=ipywidgets ipywidgets
pushd $(mktemp -d)
py.test -l --cov-report xml --cov=nbdime --pyargs nbdime
codecov
popd
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@jupyterlab/buildutils": "^3.0.0",
"lerna": "^3.14.1",
"lerna": "^4.0.0",
"rimraf": "^2.6.3"
}
}
2 changes: 1 addition & 1 deletion packages/nbdime/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
setupFiles: ['<rootDir>/test/jest-setup-files.js'],
testPathIgnorePatterns: ['/lib/', '/node_modules/'],
testRegex: '/test/src/.*.spec.ts$',
transformIgnorePatterns: ['/node_modules/(?!(@jupyterlab/.*)/)'],
transformIgnorePatterns: ['/node_modules/(?!((@jupyterlab|y-protocols|lib0)/.*))'],
globals: {
'ts-jest': {
tsconfig: tsOptions
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@jupyterlab/nbformat": "^2 || ^3",
"@jupyterlab/notebook": "^2 || ^3",
"@jupyterlab/rendermime": "^2 || ^3",
"@jupyterlab/theme-light-extension": "^2 || ^3",
"@jupyterlab/theme-light-extension": "^3.1",
"@lumino/dragdrop": "^1.3.0",
"@lumino/widgets": "^1.6.0",
"alertify.js": "^1.0.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import '@fortawesome/fontawesome-free/css/v4-shims.min.css';
import 'codemirror/lib/codemirror.css';
import '@jupyterlab/codemirror/style/index.css';

import '@jupyterlab/theme-light-extension/style/index.css';
import '@jupyterlab/theme-light-extension/style/theme.css';
import '@jupyterlab/notebook/style/index.css';

import 'nbdime/lib/common/collapsible.css';
Expand Down

0 comments on commit 559d785

Please sign in to comment.