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: remove the CDK SAM CLI integration testing and depend on the same test cases defined in CDK repo #5410

Merged
merged 15 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/cdk-sam-cli-integration-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test the integration between SAM CLI and Latest CDK version

on:
schedule:
- cron: "0 13 * * 1-5" # run 1PM UTC (6 am PDT) in every weekday
Copy link
Contributor

Choose a reason for hiding this comment

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

Why run on a schedule instead of on pr?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we already have the CDK integration test cases but we test against the synthesized templates. This integration was created to validate that every new CDK version is generating the template SAM CLI expects it, that is why we originally created the appveyor job to run daily instead of running it with each PR.

workflow_dispatch: {}

# to automatically cancel the running workflow for same PR.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
integration-tests:
name: Integration Tests / ${{ matrix.python }}
if: github.repository == 'aws/aws-sam-cli'
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: us-east-1
SAM_CLI_DEV: 1
NOSE_PARAMETERIZED_NO_WARN: 1
APPVEYOR_CONSOLE_DISABLE_PTY: false
APPVEYOR_DETAILED_SHELL_LOGGING: true
strategy:
matrix:
python:
- "3.7"
- "3.8"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
# set last version as the one in matrix to make it default
python-version: |
3.9
${{ matrix.python }}
- uses: actions/setup-go@v4
with:
go-version: '1.19'
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '8'
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Init samdev
run: make init
- name: Run CDK integration tests
run: pytest -vv tests/iac_integration
105 changes: 0 additions & 105 deletions appveyor-iac-integration-ubuntu.yml

This file was deleted.

5 changes: 1 addition & 4 deletions tests/iac_integration/cdk/test_sam_cdk_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@
import requests
from parameterized import parameterized_class, parameterized

from tests.testing_utils import run_command, start_persistent_process, read_until_string, kill_process
from tests.testing_utils import run_command, kill_process


@parameterized_class(
("cdk_project_path", "cdk_version", "cdk_stack_template"),
[
("/testdata/cdk_v1/typescript", "1.x", "TestStack.template.json"),
("/testdata/cdk_v2/typescript", "2.x", "TestStack.template.json"),
("/testdata/cdk_v1/python", "1.x", "TestStack.template.json"),
("/testdata/cdk_v2/python", "2.x", "TestStack.template.json"),
("/testdata/cdk_v1/java", "1.x", "TestStack.template.json"),
("/testdata/cdk_v2/java", "2.x", "TestStack.template.json"),
],
)
Expand Down
6 changes: 0 additions & 6 deletions tests/iac_integration/cdk/testdata/cdk_v1/java/cdk.json

This file was deleted.

90 changes: 0 additions & 90 deletions tests/iac_integration/cdk/testdata/cdk_v1/java/pom.xml

This file was deleted.

This file was deleted.

Loading