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

Update check-release #148

Merged
merged 3 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
55 changes: 31 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,76 @@ name: Build

on:
push:
branches: master
branches: main
hbcarlos marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches: '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

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

- name: Install dependencies
run: python -m pip install -U check-manifest jupyterlab
run: python -m pip install -U "jupyterlab>=3.0,<3.6"

- name: Build the extension
run: |
set -eux
# TODO: add lint check
#pushd js
#jlpm
#jlpm run eslint:check
#popd

python -m pip install .

#jupyter server extension list
#jupyter server extension list 2>&1 | grep -ie "jupyros.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@robostack/jupyter-ros.*OK"
python -m jupyterlab.browser_check
check-manifest -v

- name: Package the extension
run: |
set -eux
pip install build
python -m build --sdist
cp dist/*.tar.gz myextension.tar.gz
python -m build
pip uninstall -y "jupyros" jupyterlab
rm -rf myextension
- uses: actions/upload-artifact@v2

- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: myextension-sdist
path: myextension.tar.gz
name: extension-artifacts
path: dist/jupyros*
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: myextension-sdist
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install myextension.tar.gz
pip install jupyterlab
pip install "jupyterlab>=3.0,<3.6" jupyros*.whl

#jupyter server extension list
#jupyter server extension list 2>&1 | grep -ie "jupyros.*OK"

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@robostack/jupyter-ros.*OK"
python -m jupyterlab.browser_check --no-browser-test
python -m jupyterlab.browser_check --no-chrome-test
58 changes: 13 additions & 45 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,31 @@
name: Check Release
on:
push:
branches:
- master
branches: ["main"]
pull_request:
branches:
- master

permissions:
contents: write
branches: ["*"]

jobs:
check_release:
runs-on: ubuntu-latest
steps:
- 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('package.json') }}
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: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel jupyter-packaging~=0.10 --user
uses: actions/checkout@v3

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

- name: Install Dependencies
run: |
pip install .
pip install -e .

- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jupyros-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
path: .jupyter_releaser_checkout/dist
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
__pycache__
*.egg-info/

jupyros/_version.py

# JS deps
node_modules/

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ graft jupyros/ros1
graft jupyros/ros2
include jupyros/_version.py
include jupyros/__init__.py
include js/package.json

# Extensions
graf js
Expand Down
8 changes: 4 additions & 4 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
"devDependencies": {
"@jupyterlab/builder": "^3.0.1",
"npm-run-all": "^4.1.5",
"rimraf": "^2.6.1",
"webpack": "^5",
"webpack-cli": "^4"
"rimraf": "^4.1.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@jupyter-widgets/base": "^2.0.1 || ^3 || ^4",
"lodash": "^4.17.4",
"lodash": "^4.17.21",
"ros3d": "^1.0.0"
},
"jupyterlab": {
Expand Down
Loading