-
Notifications
You must be signed in to change notification settings - Fork 945
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 #2745 from jasongrout/tests
Consolidate test GitHub actions into a single action
- Loading branch information
Showing
6 changed files
with
133 additions
and
143 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 |
---|---|---|
|
@@ -3,7 +3,8 @@ name: Lint | |
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- 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 | ||
pip install file://$PWD#egg=ipywidgets | ||
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@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, test | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn run build | ||
yarn run build:examples | ||
pushd packages/base | ||
yarn run test:unit:firefox:headless | ||
popd | ||
pushd packages/base-manager | ||
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 | ||
pushd examples/web1 | ||
yarn run test:firefox:headless | ||
popd | ||
env: | ||
CI: true | ||
python: | ||
name: Python | ||
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 | ||
spec: | ||
name: Message Specification | ||
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 -f markdown > spec.md | ||
diff -u ./packages/schema/jupyterwidgetmodels.latest.md ./spec.md |
This file was deleted.
Oops, something went wrong.