Skip to content

Commit

Permalink
Run CI on all changed modules, not just the first one. (#223)
Browse files Browse the repository at this point in the history
* Find all changed modules, not just the first one.

* Ensure all tests pass still.

* Fix-up broken tests.

* Revert "Ensure all tests pass still."

This reverts commit f69221c.

---------

Co-authored-by: Patrick Cloke <[email protected]>
  • Loading branch information
clokep and Patrick Cloke authored Aug 15, 2024
1 parent a6dbdae commit 144e980
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/module-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
set -x
# Get all the modules that have the file "deployspec.yaml"
MODULES=$(echo $ALL_CHANGED_FILES | cut -d/ -f 2-3 | uniq)
MODULES=$(echo $ALL_CHANGED_FILES | tr ' ' '\n' | cut -d/ -f 2-3 | uniq)
# Create our json structure [{"module_name": "..."}]
MODULES_JSON=$(echo "$MODULES" | jq -R -s 'split("\n")' | jq '[ .[] | select(length > 0) ]' | jq 'map({"module_name": .})')
# Export the modules as json to the outputs
Expand Down
1 change: 1 addition & 0 deletions modules/eks/ray-operator/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def stack_defaults():
os.environ["SEEDFARMER_PARAMETER_EKS_OPENID_ISSUER"] = "sts.amazon.com"
os.environ["SEEDFARMER_PARAMETER_EKS_CLUSTER_ENDPOINT"] = "oidc.eks.us-west-2.amazonaws.com/id/XXXXXXXXXX"
os.environ["SEEDFARMER_PARAMETER_EKS_CERT_AUTH_DATA"] = "cert"
os.environ["SEEDFARMER_PARAMETER_EKS_HANDLER_ROLE_ARN"] = "arn:aws:iam::123456789012:role/eks-test-YYYYYY"
os.environ["SEEDFARMER_PARAMETER_NAMESPACE"] = "namespace"

# Unload the app import so that subsequent tests don't reuse
Expand Down
2 changes: 2 additions & 0 deletions modules/eks/ray-operator/tests/test_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def rbac_stack(stack_defaults) -> cdk.Stack:
eks_cluster_admin_role_arn = "arn:aws:iam::123456789012:role/eks-testing-XXXXXX"
eks_oidc_arn = "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/XXXXXXXX"
eks_openid_issuer = "sts.amazon.com"
eks_handler_role_arn = "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/YYYYYYYY"
namespace = "namespace"
data_bucket_name = "bucket"

Expand All @@ -48,6 +49,7 @@ def rbac_stack(stack_defaults) -> cdk.Stack:
eks_admin_role_arn=eks_cluster_admin_role_arn,
eks_oidc_arn=eks_oidc_arn,
eks_openid_issuer=eks_openid_issuer,
eks_handler_role_arn=eks_handler_role_arn,
namespace_name=namespace,
data_bucket_name=data_bucket_name,
env=cdk.Environment(
Expand Down

0 comments on commit 144e980

Please sign in to comment.