Skip to content

Commit 8ae3856

Browse files
rix0rrrgithub-actions
and
github-actions
authored
chore: move over integ tests (#389)
Keeping the CLI integ tests in a [separate repository](https://github.com/aws/aws-cdk-cli-testing) was a theoretically good idea and a practically annoying idea. Let's move them in here, this is much easier to work with. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Signed-off-by: github-actions <[email protected]> Co-authored-by: github-actions <[email protected]>
1 parent 087baf1 commit 8ae3856

File tree

328 files changed

+21727
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

328 files changed

+21727
-86
lines changed

.github/workflows/integ.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ function genericCdkProps(props: GenericProps = {}) {
347347
},
348348
typescriptVersion: TYPESCRIPT_VERSION,
349349
checkLicenses: props.private ? undefined : {
350-
allow: ['Apache-2.0', 'MIT', 'ISC'],
350+
allow: ['Apache-2.0', 'MIT', 'ISC', 'BSD-3-Clause'],
351351
},
352352
...props,
353353
} satisfies Partial<yarn.TypeScriptWorkspaceOptions>;
@@ -1649,6 +1649,101 @@ new BundleCli(integRunner, {
16491649

16501650
//////////////////////////////////////////////////////////////////////
16511651

1652+
const cliInteg = configureProject(
1653+
new yarn.TypeScriptWorkspace({
1654+
...genericCdkProps(),
1655+
parent: repo,
1656+
name: '@aws-cdk-testing/cli-integ',
1657+
description: 'Integration tests for the AWS CDK CLI',
1658+
1659+
// We set the majorVersion of this to 3.x, so that we can release
1660+
// it already without interfering with the current crop of CDK
1661+
// integ tests.
1662+
majorVersion: 3,
1663+
1664+
srcdir: '.',
1665+
libdir: '.',
1666+
deps: [
1667+
'@octokit/rest@^18.12.0',
1668+
`@aws-sdk/client-codeartifact@${CLI_SDK_V3_RANGE}`,
1669+
`@aws-sdk/client-cloudformation@${CLI_SDK_V3_RANGE}`,
1670+
`@aws-sdk/client-ecr@${CLI_SDK_V3_RANGE}`,
1671+
`@aws-sdk/client-ecr-public@${CLI_SDK_V3_RANGE}`,
1672+
`@aws-sdk/client-ecs@${CLI_SDK_V3_RANGE}`,
1673+
`@aws-sdk/client-iam@${CLI_SDK_V3_RANGE}`,
1674+
`@aws-sdk/client-lambda@${CLI_SDK_V3_RANGE}`,
1675+
`@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`,
1676+
`@aws-sdk/client-sns@${CLI_SDK_V3_RANGE}`,
1677+
`@aws-sdk/client-sso@${CLI_SDK_V3_RANGE}`,
1678+
`@aws-sdk/client-sts@${CLI_SDK_V3_RANGE}`,
1679+
`@aws-sdk/credential-providers@${CLI_SDK_V3_RANGE}`,
1680+
`@smithy/util-retry@${CLI_SDK_V3_RANGE}`,
1681+
`@smithy/types@${CLI_SDK_V3_RANGE}`,
1682+
'@cdklabs/cdk-atmosphere-client',
1683+
'axios@^1',
1684+
'chalk@^4',
1685+
'fs-extra@^9',
1686+
'glob@^7',
1687+
'make-runnable@^1',
1688+
'mockttp@^3',
1689+
'npm@^8',
1690+
'p-queue@^6',
1691+
'semver@^7',
1692+
'sinon@^9',
1693+
'ts-mock-imports@^1',
1694+
'yaml@1',
1695+
'yargs@^17',
1696+
// Jest is a runtime dependency here!
1697+
'jest@^29',
1698+
'jest-junit@^15',
1699+
'ts-jest@^29',
1700+
'node-pty',
1701+
],
1702+
devDeps: [
1703+
'@types/semver@^7',
1704+
'@types/yargs@^15',
1705+
'@types/fs-extra@^9',
1706+
'@types/glob@^7',
1707+
],
1708+
bin: {
1709+
'run-suite': 'bin/run-suite',
1710+
'download-and-run-old-tests': 'bin/download-and-run-old-tests',
1711+
'query-github': 'bin/query-github',
1712+
'apply-patches': 'bin/apply-patches',
1713+
'test-root': 'bin/test-root',
1714+
'stage-distribution': 'bin/stage-distribution',
1715+
},
1716+
tsconfig: {
1717+
compilerOptions: {
1718+
...defaultTsOptions,
1719+
esModuleInterop: false,
1720+
},
1721+
include: ['**/*.ts'],
1722+
exclude: ['resources/**/*'],
1723+
},
1724+
jestOptions: jestOptionsForProject({
1725+
jestConfig: {
1726+
coverageThreshold: {
1727+
statements: 40,
1728+
lines: 40,
1729+
functions: 10,
1730+
branches: 40,
1731+
},
1732+
},
1733+
}),
1734+
}),
1735+
);
1736+
cliInteg.eslint?.addIgnorePattern('resources/**/*.ts');
1737+
1738+
const compiledDirs = ['tests', 'test', 'lib'];
1739+
for (const compiledDir of compiledDirs) {
1740+
cliInteg.gitignore.addPatterns(`${compiledDir}/**/*.js`);
1741+
cliInteg.gitignore.addPatterns(`${compiledDir}/**/*.d.ts`);
1742+
}
1743+
cliInteg.gitignore.addPatterns('!resources/**/*.js');
1744+
1745+
//////////////////////////////////////////////////////////////////////
1746+
16521747
// The pj.github.Dependabot component is only for a single Node project,
16531748
// but we need multiple non-Node projects
16541749
new pj.YamlFile(repo, '.github/dependabot.yml', {
@@ -1688,6 +1783,7 @@ new CdkCliIntegTestsWorkflow(repo, {
16881783
cli.name,
16891784
cliLib.name,
16901785
cdkAliasPackage.name,
1786+
cliInteg.name,
16911787
],
16921788

16931789
allowUpstreamVersions: [

aws-cdk-cli.code-workspace

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/cli-integ/.eslintrc.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)