Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added test-lambda-code job to Github workflow #658

Merged
merged 1 commit into from
May 8, 2024

Conversation

craigzour
Copy link
Contributor

@craigzour craigzour commented May 8, 2024

Summary | Résumé

  • Adds a new job in the Terraform plan Github workflows in order to run unit tests in Lambda code when available.

@craigzour craigzour self-assigned this May 8, 2024
@craigzour craigzour force-pushed the chore/unit-tests-ci-cd-integration branch 2 times, most recently from 0e0af86 to ea2bed0 Compare May 8, 2024 16:43
@craigzour craigzour force-pushed the chore/unit-tests-ci-cd-integration branch from ea2bed0 to 2920979 Compare May 8, 2024 16:45
@craigzour craigzour changed the title wip chore: added test-lambda-code job to Github workflow May 8, 2024
Copy link

github-actions bot commented May 8, 2024

Staging: app

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

⚠️   Warning: resources will be destroyed by this change!

Plan: 1 to add, 0 to change, 1 to destroy
Show summary
CHANGE NAME
recreate aws_ecs_task_definition.form_viewer
Show plan
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_ecs_task_definition.form_viewer must be replaced
-/+ resource "aws_ecs_task_definition" "form_viewer" {
      ~ arn                      = "arn:aws:ecs:ca-central-1:687401027353:task-definition/form-viewer:1528" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:ca-central-1:687401027353:task-definition/form-viewer" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  - cpu              = 0
                  - essential        = true
                  ~ linuxParameters  = {
                      ~ capabilities = {
                          - add  = []
                            # (1 unchanged attribute hidden)
                        }
                    }
                  - mountPoints      = []
                    name             = "form_viewer"
                  ~ portMappings     = [
                      ~ {
                          - hostPort      = 3000
                          - protocol      = "tcp"
                            # (1 unchanged attribute hidden)
                        },
                    ]
                  - systemControls   = []
                  - volumesFrom      = []
                    # (4 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ id                       = "form-viewer" -> (known after apply)
      ~ revision                 = 1528 -> (known after apply)
      - tags                     = {} -> null
        # (9 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_appautoscaling_target.forms[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_codedeploy_app.app"]
WARN - plan.json - main - Missing Common Tags: ["aws_codedeploy_deployment_group.app"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_cluster.forms"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_service.form_viewer"]
WARN - plan.json - main - Missing Common Tags: ["aws_ecs_task_definition.form_viewer"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.cognito"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_dynamodb"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_kms"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_s3"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_secrets_manager"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.forms_sqs"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.codedeploy"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_role.forms"]

34 tests, 19 passed, 15 warnings, 0 failures, 0 exceptions

@craigzour craigzour marked this pull request as ready for review May 8, 2024 17:58
Copy link
Contributor

@bryan-robitaille bryan-robitaille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@craigzour craigzour merged commit 87c2939 into develop May 8, 2024
11 checks passed
@craigzour craigzour deleted the chore/unit-tests-ci-cd-integration branch May 8, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants