Skip to content

Commit

Permalink
worklow readme, transform existence verification, disable build-libra…
Browse files Browse the repository at this point in the history
…ry, and tools tests

Signed-off-by: David Wood <[email protected]>
  • Loading branch information
daw3rd committed Sep 18, 2024
1 parent f9399c1 commit e064e00
Show file tree
Hide file tree
Showing 27 changed files with 244 additions and 38 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@
Here we have the start of a system to automatically generated github workflows (currently only for transforms).
In general, the design is to use templates and `make` to generate/update the workflows.

Goals
1. Run only tests for a given transform when only the transform changes.
Includes python, ray, spark and kfp_ray as available.
2. When the core dpk lib components files changes, test all transforms
3. When the shared kfp components changes, test a randomly selected transform test
(We would like to avoid running all transform kfp tests in one PR)
4. Extra credit: If .md or other non-code changes are made, run no tests.

Assumptions:
1. All transforms will have test workflows. A transform can disable its tests locally
(temporarily?) by renaming its transforms/universal/noop/Makefile.disabled.
```
make
git clone ....
...
git checkout -b new-branch
make # Creates new test*.yml workflows
git commit -a -s -m "update workflows"
git push
git push --set-upstream origin new-branch
```

should be sufficient.

## Transforms
Expand All @@ -24,3 +37,6 @@ When a new transform is added to the repository,
1. Run `make` in this directory to create the new test .yml for all transforms found in transforms/{universal,code,language} directories
1. commit and push the change to your branch with the new transform.

## KFP

## DPK libraries
File renamed without changes.
10 changes: 9 additions & 1 deletion .github/workflows/test-code-code2parquet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/code/code2parquet/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/code/code2parquet/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/code/code2parquet
run: |
if [ -e "transforms/code/code2parquet/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/code/code2parquet DOCKER=docker test-image
else
echo "transforms/code/code2parquet/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-code-code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/code/code_quality/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/code/code_quality/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/code/code_quality
run: |
if [ -e "transforms/code/code_quality/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/code/code_quality DOCKER=docker test-image
else
echo "transforms/code/code_quality/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-code-header_cleanser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/code/header_cleanser/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/code/header_cleanser/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/code/header_cleanser
run: |
if [ -e "transforms/code/header_cleanser/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/code/header_cleanser DOCKER=docker test-image
else
echo "transforms/code/header_cleanser/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-code-malware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/code/malware/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/code/malware/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/code/malware
run: |
if [ -e "transforms/code/malware/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/code/malware DOCKER=docker test-image
else
echo "transforms/code/malware/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-code-proglang_select.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/code/proglang_select/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/code/proglang_select/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/code/proglang_select
run: |
if [ -e "transforms/code/proglang_select/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/code/proglang_select DOCKER=docker test-image
else
echo "transforms/code/proglang_select/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-code-repo_level_ordering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/code/repo_level_ordering/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/code/repo_level_ordering/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/code/repo_level_ordering
run: |
if [ -e "transforms/code/repo_level_ordering/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/code/repo_level_ordering DOCKER=docker test-image
else
echo "transforms/code/repo_level_ordering/Makefile not found - testing disabled for this transform."
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-kfp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "kfp/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**/.gitignore"
pull_request:
branches:
Expand All @@ -21,6 +22,7 @@ on:
- "kfp/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**/.gitignore"

env:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-language-doc_chunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/language/doc_chunk/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/language/doc_chunk/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/language/doc_chunk
run: |
if [ -e "transforms/language/doc_chunk/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/language/doc_chunk DOCKER=docker test-image
else
echo "transforms/language/doc_chunk/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-language-doc_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/language/doc_quality/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/language/doc_quality/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/language/doc_quality
run: |
if [ -e "transforms/language/doc_quality/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/language/doc_quality DOCKER=docker test-image
else
echo "transforms/language/doc_quality/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-language-lang_id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/language/lang_id/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/language/lang_id/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/language/lang_id
run: |
if [ -e "transforms/language/lang_id/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/language/lang_id DOCKER=docker test-image
else
echo "transforms/language/lang_id/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-language-pdf2parquet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/language/pdf2parquet/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/language/pdf2parquet/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/language/pdf2parquet
run: |
if [ -e "transforms/language/pdf2parquet/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/language/pdf2parquet DOCKER=docker test-image
else
echo "transforms/language/pdf2parquet/Makefile not found - testing disabled for this transform."
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/test-language-pii_redactor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ on:
paths:
- "transforms/language/pii_redactor/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"
pull_request:
branches:
- "dev"
- "releases/**"
paths:
- "transforms/language/pii_redactor/**"
- "data-processing-lib/**"
- "!**.md"
- "!**/doc/**"
- "!**/images/**"
- "!**.gitignore"

jobs:
check_if_push_image:
Expand Down Expand Up @@ -84,7 +92,7 @@ jobs:
- name: Test transform image in transforms/language/pii_redactor
run: |
if [ -e "transforms/language/pii_redactor/Makefile" ]; then
make -C data-processing-lib/spark DOCKER=docker image
make -C data-processing-lib/spark DOCKER=docker image
make -C transforms/language/pii_redactor DOCKER=docker test-image
else
echo "transforms/language/pii_redactor/Makefile not found - testing disabled for this transform."
Expand Down
Loading

0 comments on commit e064e00

Please sign in to comment.