forked from jupyterlab-contrib/jupyterlab-logout
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from huntdatacenter/dev
add support for dark mode and setup CI
- Loading branch information
Showing
7 changed files
with
210 additions
and
31 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
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,61 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
# architecture: 'x64' | ||
|
||
- name: Setup pip cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-3.10- | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
- name: Setup yarn cache | ||
uses: actions/cache@v3 | ||
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: Install test dependencies | ||
run: python3 -m pip install -U build jupyterlab~=3.0 jupyter_packaging~=0.7.9 | ||
- name: Test the extension | ||
run: | | ||
jlpm | ||
jlpm run eslint:check | ||
python3 -m pip install . | ||
jupyter labextension list 2>&1 | grep -ie "jupyterlab-logout.*OK" | ||
python3 -m jupyterlab.browser_check | ||
- name: Build extension package | ||
run: | | ||
python3 -m build --sdist --wheel --outdir dist/ . | ||
- name: Upload package artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: hcc-topbar-buttons | ||
path: dist/hcc_topbar_buttons-0.5.0-py3-none-any.whl |
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: Publish package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.release.tag_name }} | ||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
# architecture: 'x64' | ||
|
||
- name: Setup pip cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-3.10- | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | ||
- name: Setup yarn cache | ||
uses: actions/cache@v3 | ||
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: Install test dependencies | ||
run: python3 -m pip install -U build jupyterlab~=3.0 jupyter_packaging~=0.7.9 | ||
- name: Test the extension | ||
run: | | ||
jlpm | ||
jlpm run eslint:check | ||
python3 -m pip install . | ||
jupyter labextension list 2>&1 | grep -ie "jupyterlab-logout.*OK" | ||
python3 -m jupyterlab.browser_check | ||
- name: Build extension package | ||
run: | | ||
python3 -m build --sdist --wheel --outdir dist/ . | ||
- name: Publish extension package | ||
# if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} |
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
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
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