Skip to content

Commit

Permalink
test: Migrate miscellaneous SDK tests to GHA Workflow (#11032)
Browse files Browse the repository at this point in the history
* test: Migrate SDK isort tests to GHA

Signed-off-by: ddalvi <[email protected]>

* test: Migrate SDK docformatter tests to GHA

Signed-off-by: ddalvi <[email protected]>

* test: Migrate SDK Component YAML tests to GHA

Signed-off-by: ddalvi <[email protected]>

---------

Signed-off-by: ddalvi <[email protected]>
  • Loading branch information
DharmitD authored Jul 26, 2024
1 parent 1e95eb6 commit f1d5479
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/sdk-component-yaml.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions .github/workflows/sdk-docformatter.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions .github/workflows/sdk-isort.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f1d5479

Please sign in to comment.