Skip to content

Commit 20eaf56

Browse files
author
Liav Weiss (EXT-Nokia)
committed
Migrate shared test/quality related workflows from kubeflow/kubeflow to notebooks-v1 branch
Signed-off-by: Liav Weiss (EXT-Nokia) <[email protected]>
1 parent 5f191bc commit 20eaf56

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Common Frontend Tests
2+
on:
3+
pull_request:
4+
paths:
5+
- components/crud-web-apps/common/frontend/kubeflow-common-lib/**
6+
- releasing/version/VERSION
7+
branches:
8+
- main
9+
- v*-branch
10+
- notebooks-v1
11+
12+
env:
13+
FRONTEND_DIR: components/crud-web-apps/common/frontend/kubeflow-common-lib
14+
15+
jobs:
16+
frontend-format-lint-check:
17+
name: Check code format and lint
18+
runs-on: ubuntu-22.04
19+
defaults:
20+
run:
21+
working-directory: ${{ env.FRONTEND_DIR }}
22+
23+
steps:
24+
- name: Check out code
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 16
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Check frontend code formatting
36+
run: npm run format:check
37+
38+
- name: Check frontend code linting
39+
run: npm run lint-check
40+
41+
frontend-unit-tests:
42+
runs-on: ubuntu-22.04
43+
name: Unit tests
44+
defaults:
45+
run:
46+
working-directory: ${{ env.FRONTEND_DIR }}
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Setup node version to 16
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: 16
55+
56+
- name: Install Kubeflow common library dependencies
57+
run: npm ci
58+
59+
- name: Run unit tests
60+
run: npm run test:prod

.github/workflows/python_lint.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Python Linting
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- v*-branch
8+
- notebooks-v1
9+
paths:
10+
- "**.py"
11+
12+
jobs:
13+
flake8-lint:
14+
runs-on: ubuntu-22.04
15+
name: Check
16+
steps:
17+
- name: Checkout source repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python environment 3.8
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.8"
24+
25+
- name: flake8 Lint
26+
uses: py-actions/flake8@v2
27+
with:
28+
exclude: "docs"

0 commit comments

Comments
 (0)