Skip to content
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
60 changes: 60 additions & 0 deletions .github/workflows/common_frontend_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Common Frontend Tests
on:
pull_request:
paths:
- components/crud-web-apps/common/frontend/kubeflow-common-lib/**
- releasing/version/VERSION
branches:
- main
- v*-branch
- notebooks-v1

env:
FRONTEND_DIR: components/crud-web-apps/common/frontend/kubeflow-common-lib

jobs:
frontend-format-lint-check:
name: Check code format and lint
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ${{ env.FRONTEND_DIR }}

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install dependencies
run: npm ci

- name: Check frontend code formatting
run: npm run format:check

- name: Check frontend code linting
run: npm run lint-check

frontend-unit-tests:
runs-on: ubuntu-22.04
name: Unit tests
defaults:
run:
working-directory: ${{ env.FRONTEND_DIR }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node version to 16
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Kubeflow common library dependencies
run: npm ci

- name: Run unit tests
run: npm run test:prod
28 changes: 28 additions & 0 deletions .github/workflows/python_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Python Linting

on:
pull_request:
branches:
- main
- v*-branch
- notebooks-v1
paths:
- "**.py"

jobs:
flake8-lint:
runs-on: ubuntu-22.04
name: Check
steps:
- name: Checkout source repository
uses: actions/checkout@v4

- name: Set up Python environment 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: flake8 Lint
uses: py-actions/flake8@v2
with:
exclude: "docs"
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Run `ng test kubeflow` to execute the unit tests via [Karma](https://karma-runne
## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI documents](https://angular.io/cli).

## Trigger checks
6 changes: 6 additions & 0 deletions components/crud-web-apps/volumes/backend/apps/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

from . import status

def dummy_function():
"""
This is a dummy function to trigger checks.
"""
return "dummy_function"


def parse_pvc(pvc, notebooks):
"""
Expand Down
Loading