File tree Expand file tree Collapse file tree 19 files changed +482
-36
lines changed
packages/integration-tests Expand file tree Collapse file tree 19 files changed +482
-36
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
Original file line number Diff line number Diff line change @@ -2,17 +2,36 @@ name: build_with_cache
2
2
description : builds the source code if cache miss and caches the result
3
3
inputs :
4
4
node-version :
5
- default : 18
5
+ required : true
6
+ cdk-version :
7
+ required : true
6
8
runs :
7
9
using : composite
8
10
steps :
11
+ # Validate that non-blank inputs are provided.
12
+ # This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
13
+ # The 'required' input property does not assert this if value is provided at runtime.
14
+ - name : Validate input
15
+ shell : bash
16
+ run : |
17
+ if [ -z "${{ inputs.cdk-version }}" ]; then
18
+ echo "CDK version must be provided"
19
+ exit 1;
20
+ fi
21
+ if [ -z "${{ inputs.node-version }}" ]; then
22
+ echo "Node version must be provided"
23
+ exit 1;
24
+ fi
9
25
- uses : ./.github/actions/install_with_cache
26
+ with :
27
+ node-version : ${{ inputs.node-version }}
28
+ cdk-version : ${{ inputs.cdk-version }}
10
29
# cache build output based on commit sha
11
30
- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
12
31
id : build-cache
13
32
with :
14
33
path : ' **/lib'
15
- key : ${{ github.sha }}-node${{ inputs.node-version }}
34
+ key : ${{ github.sha }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
16
35
enableCrossOsArchive : true
17
36
# only build if cache miss
18
37
- if : steps.build-cache.outputs.cache-hit != 'true'
Original file line number Diff line number Diff line change @@ -2,19 +2,41 @@ name: install_with_cache
2
2
description : installs node_modules if cache miss and stores in the cache
3
3
inputs :
4
4
node-version :
5
- default : 18
5
+ required : true
6
+ cdk-version :
7
+ required : true
6
8
runs :
7
9
using : composite
8
10
steps :
11
+ # Validate that non-blank inputs are provided.
12
+ # This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
13
+ # The 'required' input property does not assert this if value is provided at runtime.
14
+ - name : Validate input
15
+ shell : bash
16
+ run : |
17
+ if [ -z "${{ inputs.cdk-version }}" ]; then
18
+ echo "CDK version must be provided"
19
+ exit 1;
20
+ fi
21
+ if [ -z "${{ inputs.node-version }}" ]; then
22
+ echo "Node version must be provided"
23
+ exit 1;
24
+ fi
9
25
# cache node_modules based on package-lock.json hash
10
26
- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
11
27
id : npm-cache
12
28
with :
13
29
path : |
14
30
node_modules
15
31
packages/**/node_modules
16
- key : ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}
32
+ key : ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
17
33
# only install if cache miss
18
34
- if : steps.npm-cache.outputs.cache-hit != 'true'
19
35
shell : bash
20
- run : npm ci
36
+ run : |
37
+ npm ci
38
+ if [[ ${{ inputs.cdk-version }} != 'FROM_PACKAGE_LOCK' ]]; then
39
+ echo "Installing CDK version ${{ inputs.cdk-version }}"
40
+ npm install --no-save aws-cdk@${{ inputs.cdk-version }} aws-cdk-lib@${{ inputs.cdk-version }}
41
+ npx cdk --version
42
+ fi
Original file line number Diff line number Diff line change @@ -3,16 +3,35 @@ description: composes restoring node_modules and restoring build artifacts
3
3
inputs :
4
4
node-version :
5
5
description : node version used to configure environment with
6
- default : 18
6
+ required : true
7
+ cdk-version :
8
+ required : true
7
9
runs :
8
10
using : composite
9
11
steps :
12
+ # Validate that non-blank inputs are provided.
13
+ # This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
14
+ # The 'required' input property does not assert this if value is provided at runtime.
15
+ - name : Validate input
16
+ shell : bash
17
+ run : |
18
+ if [ -z "${{ inputs.cdk-version }}" ]; then
19
+ echo "CDK version must be provided"
20
+ exit 1;
21
+ fi
22
+ if [ -z "${{ inputs.node-version }}" ]; then
23
+ echo "Node version must be provided"
24
+ exit 1;
25
+ fi
10
26
- uses : ./.github/actions/restore_install_cache
27
+ with :
28
+ node-version : ${{ inputs.node-version }}
29
+ cdk-version : ${{ inputs.cdk-version }}
11
30
# restore build output from cache
12
31
- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
13
32
id : build-cache
14
33
with :
15
34
path : ' **/lib'
16
- key : ${{ github.sha }}-node${{ inputs.node-version }}
35
+ key : ${{ github.sha }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
17
36
fail-on-cache-miss : true
18
37
enableCrossOsArchive : true
Original file line number Diff line number Diff line change @@ -3,16 +3,32 @@ description: restores node_modules from the cache and fails if no cache entry fo
3
3
inputs :
4
4
node-version :
5
5
description : node version used to configure environment with
6
- default : 18
6
+ required : true
7
+ cdk-version :
8
+ required : true
7
9
runs :
8
10
using : composite
9
11
steps :
12
+ # Validate that non-blank inputs are provided.
13
+ # This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
14
+ # The 'required' input property does not assert this if value is provided at runtime.
15
+ - name : Validate input
16
+ shell : bash
17
+ run : |
18
+ if [ -z "${{ inputs.cdk-version }}" ]; then
19
+ echo "CDK version must be provided"
20
+ exit 1;
21
+ fi
22
+ if [ -z "${{ inputs.node-version }}" ]; then
23
+ echo "Node version must be provided"
24
+ exit 1;
25
+ fi
10
26
# restore node_modules from cache
11
27
- uses : actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
12
28
id : npm-cache
13
29
with :
14
30
path : |
15
31
node_modules
16
32
packages/**/node_modules
17
- key : ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}
33
+ key : ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
18
34
fail-on-cache-miss : true
Original file line number Diff line number Diff line change 9
9
required : false
10
10
node_version :
11
11
description : node version used to configure environment with
12
- required : false
12
+ required : true
13
13
e2e_test_accounts :
14
14
description : Serialized JSON array of strings with account numbers
15
15
required : true
@@ -22,6 +22,8 @@ inputs:
22
22
fresh_build :
23
23
description : Whether should build from scratch
24
24
default : false
25
+ cdk-version :
26
+ required : true
25
27
runs :
26
28
using : composite
27
29
steps :
32
34
- name : Restore Build Cache
33
35
if : inputs.fresh_build != 'true'
34
36
uses : ./.github/actions/restore_build_cache
37
+ with :
38
+ cdk-version : ${{ inputs.cdk-version }}
39
+ node-version : ${{ inputs.node_version }}
35
40
- name : Build With Cache
36
41
if : inputs.fresh_build == 'true'
37
42
uses : ./.github/actions/build_with_cache
43
+ with :
44
+ cdk-version : ${{ inputs.cdk-version }}
45
+ node-version : ${{ inputs.node_version }}
38
46
- name : Link CLI
39
47
if : inputs.link_cli == 'true'
40
48
shell : bash
Original file line number Diff line number Diff line change 1
1
name : setup_baseline_version
2
2
description : Set up a baseline or "previous" version of the library for testing. Mostly useful for backwards compatibility
3
+ inputs :
4
+ node_version :
5
+ description : node version used to configure environment with
6
+ required : true
3
7
outputs :
4
8
baseline_dir :
5
9
description : ' Path where baseline project directory is setup'
35
39
with :
36
40
ref : ${{ steps.get_baseline_commit_sha.outputs.baseline_commit_sha }}
37
41
- uses : ./.github/actions/setup_node
42
+ with :
43
+ node-version : ${{ inputs.node_version }}
38
44
- name : Install and build baseline version
39
45
shell : bash
40
46
run : |
Original file line number Diff line number Diff line change @@ -4,10 +4,20 @@ name: setup_node
4
4
inputs :
5
5
node-version :
6
6
description : node version used to configure environment with
7
- default : 18
7
+ required : true
8
8
runs :
9
9
using : composite
10
10
steps :
11
+ # Validate that non-blank inputs are provided.
12
+ # This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
13
+ # The 'required' input property does not assert this if value is provided at runtime.
14
+ - name : Validate input
15
+ shell : bash
16
+ run : |
17
+ if [ -z "${{ inputs.node-version }}" ]; then
18
+ echo "Node version must be provided"
19
+ exit 1;
20
+ fi
11
21
- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # version 4.0.2
12
22
with :
13
23
node-version : ${{ inputs.node-version }}
Original file line number Diff line number Diff line change 11
11
steps :
12
12
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # version 4.1.4
13
13
- uses : ./.github/actions/setup_node
14
+ with :
15
+ node-version : 18
14
16
- name : Install and build without lock file
15
17
shell : bash
16
18
run : |
46
48
uses : ./.github/actions/run_with_e2e_account
47
49
with :
48
50
e2e_test_accounts : ${{ vars.E2E_TEST_ACCOUNTS }}
49
- node_version : ${{ matrix.node-version }}
51
+ node_version : 18
52
+ # Use version from package lock. Tests projects are created outside of repository root
53
+ # and are using latest CDK version.
54
+ cdk-version : FROM_PACKAGE_LOCK
50
55
aws_region : ${{ matrix.region }}
51
56
fresh_build : true
52
57
shell : bash
Original file line number Diff line number Diff line change 28
28
steps :
29
29
- uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # version 4.1.4
30
30
- uses : ./.github/actions/setup_node
31
+ with :
32
+ node-version : 18
31
33
- uses : ./.github/actions/install_with_cache
34
+ with :
35
+ node-version : 18
36
+ cdk-version : FROM_PACKAGE_LOCK
32
37
deprecate_release :
33
38
needs :
34
39
- install
47
52
# fetch full history so that we can properly lookup past releases
48
53
fetch-depth : 0
49
54
- uses : ./.github/actions/setup_node
55
+ with :
56
+ node-version : 18
50
57
- uses : ./.github/actions/restore_install_cache
58
+ with :
59
+ node-version : 18
60
+ cdk-version : FROM_PACKAGE_LOCK
51
61
- name : Deprecate release versions
52
62
run : npx tsx scripts/deprecate_release.ts
You can’t perform that action at this time.
0 commit comments