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

add CI and requirements.txt file #15

Closed
wants to merge 6 commits into from
Closed
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
10 changes: 10 additions & 0 deletions .github/actions/build-extension/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Build"
runs:
using: "composite"
steps:
- name: Build the extension
run: |
set -eux
python -m pip install .
shell: bash

21 changes: 21 additions & 0 deletions .github/actions/post-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Post Test"
runs:
using: "composite"
steps:
- name: Install check-manifest
run: python -m pip install -U check-manifest
shell: bash
- name: Install Playwright
run: npx playwright install --with-deps
shell: bash
- name: extension checks
run: |
jupyter server extension list 2>&1 | grep -ie "zenodo_jupyterlab.*OK"
jupyter labextension list 2>&1 | grep -ie "zenodo-jupyterlab.*OK"
shell: bash
- name: Browser check
run: python -m jupyterlab.browser_check
shell: bash
- name: Check Manifest.in
run: check-manifest -v
shell: bash
40 changes: 40 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Setup"
runs:
using: "composite"
steps:
- name: Install node
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Setup pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-3.11-${{ hashFiles('package.json') }}
restore-keys: |
pip-3.11-
pip-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
shell: bash
- name: Setup yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Install Python dependencies
run: python -m pip install -r requirements.txt
shell: bash
- name: Install JS dependencies
run: jlpm
shell: bash

16 changes: 16 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Test"
runs:
using: "composite"
steps:
- name: Run ESLint
run: jlpm run eslint:check
shell: bash
- name: Run Jest
run: jlpm jest
shell: bash
- name: Run Pytest
run: pytest zenodo_jupyterlab/tests/
shell: bash
- name: Run Pylint
run: pylint --fail-under=8.5 zenodo_jupyterlab/
shell: bash
18 changes: 18 additions & 0 deletions .github/workflows/build_extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and test extension

on:
push:
branches: master
pull_request:
branches: '*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- uses: ./.github/actions/test
- uses: ./.github/actions/build-extension
- uses: ./.github/actions/post-test
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jupyterlab>=4.0.0,<5
notebook<7
Loading