diff --git a/.github/workflows/common_frontend_tests.yaml b/.github/workflows/common_frontend_tests.yaml new file mode 100644 index 00000000..aa4aecc2 --- /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 00000000..aa0a6058 --- /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