Skip to content

add CI and requirements.txt file #3

add CI and requirements.txt file

add CI and requirements.txt file #3

name: Build and test extension
on:
push:
branches: master
pull_request:
branches: '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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.10'
architecture: 'x64'
- name: Setup pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-3.10-${{ hashFiles('package.json') }}
restore-keys: |
pip-3.10-
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
test:
runs-on: ubuntu-latest
steps:
- name: Run ESLint
run: jlpm run eslint:check
shell: bash
- name: Run Jest
run: jlpm jest
shell: bash
- name: Run Pytest
run: pytest rucio_jupyterlab/tests/
shell: bash
- name: Run Pylint
run: pylint --fail-under=8.5 rucio_jupyterlab/
shell: bash
build-extension:
runs-on: ubuntu-latest
steps:
- name: Build the extension
run: |
set -eux
python -m pip install .
shell: bash
post-test:
runs-on: ubuntu-latest
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 "rucio_jupyterlab.*OK"
jupyter labextension list 2>&1 | grep -ie "rucio-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