From 55fece5376313af38002f10aa460ddb0e1f85dfc Mon Sep 17 00:00:00 2001 From: ddalvi Date: Tue, 23 Jul 2024 22:43:58 -0400 Subject: [PATCH 1/3] test: Migrate SDK isort tests to GHA Signed-off-by: ddalvi --- .github/workflows/sdk-isort.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/sdk-isort.yml diff --git a/.github/workflows/sdk-isort.yml b/.github/workflows/sdk-isort.yml new file mode 100644 index 00000000000..a00056ae779 --- /dev/null +++ b/.github/workflows/sdk-isort.yml @@ -0,0 +1,26 @@ +name: KFP SDK Isort Test + +on: + push: + branches: [master] + + pull_request: + paths: + - 'sdk/python/**' + - 'test/presubmit-isort-sdk.sh' + - '.github/workflows/sdk-isort.yml' + +jobs: + test-isort-kfp-sdk: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: Run isort tests + run: ./test/presubmit-isort-sdk.sh \ No newline at end of file From 16c91da2bb44fa22e2b3742d92ff750f075070ce Mon Sep 17 00:00:00 2001 From: ddalvi Date: Tue, 23 Jul 2024 22:47:17 -0400 Subject: [PATCH 2/3] test: Migrate SDK docformatter tests to GHA Signed-off-by: ddalvi --- .github/workflows/sdk-docformatter.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/sdk-docformatter.yml diff --git a/.github/workflows/sdk-docformatter.yml b/.github/workflows/sdk-docformatter.yml new file mode 100644 index 00000000000..20a11af0921 --- /dev/null +++ b/.github/workflows/sdk-docformatter.yml @@ -0,0 +1,26 @@ +name: KFP SDK Docformatter Test + +on: + push: + branches: [master] + + pull_request: + paths: + - 'sdk/python/**' + - 'test/presubmit-docformatter-sdk.sh' + - '.github/workflows/sdk-docformatter.yml' + +jobs: + test-docformatter-kfp-sdk: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: Run docformatter tests + run: ./test/presubmit-docformatter-sdk.sh \ No newline at end of file From d510af884848e2cdd19ed4a19048da1c2e87e929 Mon Sep 17 00:00:00 2001 From: ddalvi Date: Tue, 23 Jul 2024 22:49:05 -0400 Subject: [PATCH 3/3] test: Migrate SDK Component YAML tests to GHA Signed-off-by: ddalvi --- .github/workflows/sdk-component-yaml.yml | 56 ++++++++++++++++++++++++ .github/workflows/sdk-docformatter.yml | 2 +- .github/workflows/sdk-isort.yml | 2 +- 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/sdk-component-yaml.yml diff --git a/.github/workflows/sdk-component-yaml.yml b/.github/workflows/sdk-component-yaml.yml new file mode 100644 index 00000000000..316ce85caca --- /dev/null +++ b/.github/workflows/sdk-component-yaml.yml @@ -0,0 +1,56 @@ +name: KFP Component YAML Test + +on: + push: + branches: [master] + + pull_request: + paths: + - 'components/**/*.yaml' + - 'test/presubmit-component-yaml.sh' + - 'sdk/python/**' + - 'api/v2alpha1/**' + - '.github/workflows/sdk-component-yaml.yml' + +jobs: + test-component-yaml-kfp: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: apt-get update + run: sudo apt-get update + + - name: Install protobuf-compiler + run: sudo apt-get install protobuf-compiler -y + + - name: Install setuptools + run: | + pip3 install setuptools + pip3 freeze + + - name: Install Wheel + run: pip3 install wheel==0.42.0 + + - name: Install protobuf + run: pip3 install protobuf==4.25.3 + + - name: Generate API proto files + working-directory: ./api + run: make clean python + + - name: Install kfp-pipeline-spec from source + run: | + python3 -m pip install api/v2alpha1/python + + - name: Install requirements + run: pip install -r ./test/sdk-execution-tests/requirements.txt + + - name: Run component YAML tests + run: ./test/presubmit-component-yaml.sh diff --git a/.github/workflows/sdk-docformatter.yml b/.github/workflows/sdk-docformatter.yml index 20a11af0921..83b583ca3aa 100644 --- a/.github/workflows/sdk-docformatter.yml +++ b/.github/workflows/sdk-docformatter.yml @@ -23,4 +23,4 @@ jobs: python-version: 3.8 - name: Run docformatter tests - run: ./test/presubmit-docformatter-sdk.sh \ No newline at end of file + run: ./test/presubmit-docformatter-sdk.sh diff --git a/.github/workflows/sdk-isort.yml b/.github/workflows/sdk-isort.yml index a00056ae779..05124d19378 100644 --- a/.github/workflows/sdk-isort.yml +++ b/.github/workflows/sdk-isort.yml @@ -23,4 +23,4 @@ jobs: python-version: 3.8 - name: Run isort tests - run: ./test/presubmit-isort-sdk.sh \ No newline at end of file + run: ./test/presubmit-isort-sdk.sh