Skip to content

Commit

Permalink
update pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
matuskosut committed Mar 9, 2024
1 parent 4327fe0 commit 7a1d4ad
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 97 deletions.
62 changes: 30 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,51 @@ name: Build

on:
push:
branches: main
branches: ['main']
pull_request:
branches: '*'
branches: ['*']

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'
cache: 'yarn'
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
# 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 dependencies
run: python3 -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.7.9
- name: Build the extension
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build hatch "jupyterlab>=4.0.0,<5" "hatch-nodejs-version"
- name: Lint the extension
run: |
set -eux
jlpm
jlpm run eslint:check
python3 -m pip install .
jlpm run lint:check
- name: Build the extension
run: |
set -eux
python -m pip install .
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-logout.*OK"
python3 -m jupyterlab.browser_check
python -m jupyterlab.browser_check
- name: Build package
run: |
python -m build
61 changes: 29 additions & 32 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,49 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'
cache: 'yarn'
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
# 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: |
python -m pip install --upgrade pip
python -m pip install build hatch "jupyterlab>=4.0.0,<5" "hatch-nodejs-version"
- name: Lint the extension
run: |
set -eux
jlpm
jlpm run eslint:check
python3 -m pip install .
jlpm run lint:check
- name: Build the extension
run: |
set -eux
python -m pip install .
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-logout.*OK"
python3 -m jupyterlab.browser_check
python -m jupyterlab.browser_check
- name: Build extension package
run: |
python3 -m build --sdist --wheel --outdir dist/ .
python3 -m build
- name: Upload package artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hcc-topbar-buttons
path: dist/hcc_topbar_buttons-0.5.0-py3-none-any.whl
path: |
dist/hcc_topbar_buttons-*-py3-none-any.whl
59 changes: 26 additions & 33 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,47 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '18'
cache: 'yarn'
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
# 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: |
python -m pip install --upgrade pip
python -m pip install build hatch "jupyterlab>=4.0.0,<5" "hatch-nodejs-version"
- name: Lint the extension
run: |
set -eux
jlpm
jlpm run eslint:check
python3 -m pip install .
jlpm run lint:check
- name: Build the extension
run: |
set -eux
python -m pip install .
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-logout.*OK"
python3 -m jupyterlab.browser_check
- name: Build extension package
python -m jupyterlab.browser_check
- name: Build package
run: |
python3 -m build --sdist --wheel --outdir dist/ .
- name: Publish extension package
# if: startsWith(github.ref, 'refs/tags')
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 7a1d4ad

Please sign in to comment.