Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use maintainer-tools base setup action, update Python versions on CI #1043

Merged
merged 3 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html
name: Binder Badge
on:
pull_request_target:
types: [opened]

permissions:
pull-requests:
write

jobs:
binder:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=voila/tree) :point_left: Try it on binder (branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_)`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
- uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1
with:
github_token: ${{ secrets.github_token }}
url_path: voila/tree
14 changes: 3 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,12 @@ jobs:
- 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.9'
architecture: 'x64'
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install Dependencies
run: |
python -m pip install -U pip jupyterlab~=3.0 jupyter_packaging~=0.10 'nbclassic!=0.3.3'
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.10

- name: Install the Voilà Preview JupyterLab extension
run: |
Expand Down
35 changes: 3 additions & 32 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: 'x64'

- name: Install node
uses: actions/setup-node@v2
with:
node-version: '14.x'

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"

- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Cache checked links
uses: actions/cache@v2
with:
path: ~/.cache/pytest-link-check
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/.md') }}-md-links
restore-keys: |
${{ runner.os }}-linkcheck-
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel jupyter-packaging~=0.10 --user
pip install --upgrade jupyter-packaging~=0.10 --user

- name: Install Dependencies
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -44,7 +44,6 @@ jobs:
(cd tests/skip_template; pip install .)

- name: Run tests (with traitlets 5)
if: matrix.python_version != '3.6'
shell: bash -l {0}
run: |
pip install "traitlets>=5.0.3,<6"
Expand Down Expand Up @@ -76,7 +75,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2

Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,30 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install setuptools jupyter_packaging~=0.10 "jupyterlab>=3,<4" build

- name: Build pypi distributions
run: |
python -m build

- name: Build npm distributions
run: |
pushd packages/jupyterlab-preview
npm pack
popd
cp packages/*/*.tgz dist

- name: Build checksum file
run: |
cd dist
sha256sum * | tee SHA256SUMS

- name: Upload distributions
uses: actions/upload-artifact@v2
with:
Expand All @@ -60,11 +58,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ['3.6', '3.9']
python: ['3.7', '3.10']
include:
- python: '3.6'
- python: '3.7'
dist: 'voila*.tar.gz'
- python: '3.9'
- python: '3.10'
dist: 'voila*.whl'
- os: windows
py_cmd: python
Expand Down
33 changes: 3 additions & 30 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,13 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '16.x'

- name: Cache pip on Linux
uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: |
python -m pip install --upgrade pip jupyterlab~=3.0 numpy bqplot matplotlib ipympl==0.8.0 ipyvolume scipy
python -m pip install --upgrade jupyterlab~=3.0 numpy bqplot matplotlib ipympl==0.8.0 ipyvolume scipy
python -m pip install ".[test]"
jlpm
jlpm build
Expand Down