From cfb7fca4da87e64d8eee0e70e78a8786fb8811da Mon Sep 17 00:00:00 2001 From: Axel Bocciarelli Date: Thu, 27 Jun 2024 15:04:45 +0200 Subject: [PATCH] Split lint from build and update GitHub actions --- .github/workflows/build.yml | 13 +++++++------ .github/workflows/lint.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/release.yml | 2 +- package.json | 2 +- yarn.lock | 13 ++----------- 5 files changed, 40 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 601ad51..61a70ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,19 +14,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🏷ī¸ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Base Setup 🕹ī¸ 🐍 uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - name: Install dependencies ⚙ī¸ + - name: Install requirements ⚙ī¸ run: python -m pip install -U jupyterlab>=4.0 check-manifest + - name: Install dependencies ⚙ī¸ + run: jlpm install + - name: Build the extension 🏗ī¸ run: | set -eux - jlpm - jlpm run lint python -m pip install . jupyter labextension list 2>&1 | grep -ie "jupyterlab-h5web.*OK" @@ -41,14 +42,14 @@ jobs: rm -rf jupyterlab_h5web - name: Upload debug logs on failure đŸ“Ŧ - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: Build log path: | /tmp/*.log - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: jupyterlab_h5web-dist path: dist diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..0425054 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,29 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_call: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout 🏷ī¸ + uses: actions/checkout@v4 + + - name: Base Setup 🕹ī¸ 🐍 + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Install requirements ⚙ī¸ + run: python -m pip install -U jupyterlab>=4.0 + + - name: Install dependencies ⚙ī¸ + run: jlpm install + + - name: Lint 🏗ī¸ + run: jlpm run lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6125d80..e8ed463 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download the built extension - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: jupyterlab_h5web-dist path: dist diff --git a/package.json b/package.json index 52798ca..74e5266 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ }, "devDependencies": { "@jupyterlab/builder": "^4.0.0", - "@types/node": "^18.15.11", + "@types/node": "^20.14.9", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.55.0", diff --git a/yarn.lock b/yarn.lock index 2925557..09f9a88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1603,7 +1603,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": +"@types/node@npm:*, @types/node@npm:^20.14.9": version: 20.14.9 resolution: "@types/node@npm:20.14.9" dependencies: @@ -1612,15 +1612,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^18.15.11": - version: 18.19.39 - resolution: "@types/node@npm:18.19.39" - dependencies: - undici-types: ~5.26.4 - checksum: d1de755983127b405458c427ae2cf77c89d120a617ca70999086a75fb0b6c6dbc1bdddfe1a8a7374c9ae55ed0589a2bd023ffb3b09ee25440c013afc6502dfe6 - languageName: node - linkType: hard - "@types/normalize-package-data@npm:^2.4.0": version: 2.4.4 resolution: "@types/normalize-package-data@npm:2.4.4" @@ -5201,7 +5192,7 @@ __metadata: "@jupyterlab/ui-components": ^4.0.0 "@lumino/widgets": ^2.0.0 "@react-hookz/web": ^24.0.4 - "@types/node": ^18.15.11 + "@types/node": ^20.14.9 "@types/react": ^18.0.0 "@types/react-dom": ^18.0.0 "@typescript-eslint/eslint-plugin": ^5.55.0