Skip to content
Open
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
55 changes: 27 additions & 28 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,36 @@ jobs:
code-quality:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -r .github/requirements.txt
- name: Run black
run: black . --check
- name: Setup flake8 annotations
uses: rbialon/flake8-annotations@v1

build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "20.x"
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel jupyter-packaging "jupyterlab<5"
pip install twine wheel jupyter-builder

- name: Build
run: |
Expand All @@ -59,7 +57,7 @@ jobs:
- name: Build
run: |
cd js
npm pack
npm pack --ignore-scripts

- name: Check number of files in wheel
run: |
Expand All @@ -69,7 +67,7 @@ jobs:
if [[ $(ls -1 count | wc -l) -ne 3 ]]; then echo "Expected 4 files/directory"; exit 1; fi

- name: Upload builds
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ipyvue-dist-${{ github.run_number }}
path: |
Expand Down Expand Up @@ -105,14 +103,14 @@ jobs:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvue-dist-${{ github.run_number }}

- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -134,14 +132,14 @@ jobs:
needs: [build]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvue-dist-${{ github.run_number }}

- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.8

Expand All @@ -163,7 +161,7 @@ jobs:

- name: Upload Test artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ipyvue-test-results
path: test-results
Expand All @@ -172,14 +170,14 @@ jobs:
needs: [test, ui-test, code-quality]
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvue-dist-${{ github.run_number }}

- name: Install node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "20.x"
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Publish the NPM package
Expand All @@ -189,33 +187,35 @@ jobs:
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --dry-run --tag ${TAG} --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}

release:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: [release-dry-run]
runs-on: ubuntu-24.04
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: ipyvue-dist-${{ github.run_number }}

- name: Install node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: "20.x"
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Install Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel jupyter-packaging jupyterlab
pip install twine wheel

- name: Publish the Python package
env:
Expand All @@ -230,5 +230,4 @@ jobs:
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --tag ${TAG} --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}
Loading
Loading