diff --git a/.github/workflows/common_frontend_tests.yaml b/.github/workflows/common_frontend_tests.yaml new file mode 100644 index 000000000..aa4aecc2f --- /dev/null +++ b/.github/workflows/common_frontend_tests.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/python_lint.yaml b/.github/workflows/python_lint.yaml new file mode 100644 index 000000000..aa0a60586 --- /dev/null +++ b/.github/workflows/python_lint.yaml @@ -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" \ No newline at end of file diff --git a/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/README.md b/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/README.md index 45f632dd5..12d1b3258 100644 --- a/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/README.md +++ b/components/crud-web-apps/common/frontend/kubeflow-common-lib/projects/kubeflow/README.md @@ -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 diff --git a/components/crud-web-apps/volumes/backend/apps/common/utils.py b/components/crud-web-apps/volumes/backend/apps/common/utils.py index 719dcbdca..7a12a250a 100644 --- a/components/crud-web-apps/volumes/backend/apps/common/utils.py +++ b/components/crud-web-apps/volumes/backend/apps/common/utils.py @@ -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): """