Skip to content

Commit 5d9b288

Browse files
committed
chore: copy workflows from code branch
1 parent 98577bc commit 5d9b288

File tree

8 files changed

+664
-0
lines changed

8 files changed

+664
-0
lines changed

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: pip
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
labels:
10+
- auto-approve
11+
open-pull-requests-limit: 5
12+
- package-ecosystem: maven
13+
directory: /
14+
schedule:
15+
interval: weekly
16+
labels:
17+
- auto-approve
18+
open-pull-requests-limit: 5
19+
- package-ecosystem: nuget
20+
directory: /
21+
schedule:
22+
interval: weekly
23+
labels:
24+
- auto-approve
25+
open-pull-requests-limit: 5

.github/workflows/auto-approve.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
2+
3+
name: auto-approve
4+
on:
5+
pull_request_target:
6+
types:
7+
- labeled
8+
- opened
9+
- synchronize
10+
- reopened
11+
- ready_for_review
12+
jobs:
13+
approve:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: write
17+
if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'aws-cdk-automation' || github.event.pull_request.user.login == 'dependabot[bot]')
18+
steps:
19+
- uses: hmarr/auto-approve-action@v2.2.1
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/auto-queue.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
2+
3+
name: auto-queue
4+
on:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- reopened
9+
- ready_for_review
10+
jobs:
11+
enableAutoQueue:
12+
name: "Set AutoQueue on PR #${{ github.event.number }}"
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
16+
contents: write
17+
steps:
18+
- uses: peter-evans/enable-pull-request-automerge@v3
19+
with:
20+
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
21+
pull-request-number: ${{ github.event.number }}
22+
merge-method: squash
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
2+
3+
name: build-and-integ
4+
on:
5+
pull_request_target:
6+
branches:
7+
- main
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
environment: integ-approval
14+
env:
15+
CI: "true"
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22+
fetch-depth: 0
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: lts/*
27+
- name: Install dependencies
28+
run: yarn install --check-files
29+
- name: Bump to realistic versions
30+
env:
31+
TESTING_CANDIDATE: "true"
32+
run: yarn workspaces run bump
33+
- name: build
34+
env:
35+
RELEASE: "true"
36+
run: npx projen build
37+
- name: Upload artifact
38+
uses: actions/upload-artifact@v4.4.0
39+
with:
40+
name: build-artifact
41+
path: packages/**/dist/js/*.tgz
42+
overwrite: "true"
43+
integ:
44+
needs: build
45+
runs-on: aws-cdk_ubuntu-latest_4-core
46+
permissions:
47+
contents: read
48+
id-token: write
49+
environment: run-tests
50+
env:
51+
MAVEN_ARGS: --no-transfer-progress
52+
IS_CANARY: "true"
53+
CI: "true"
54+
CLI_LIB_VERSION_MIRRORS_CLI: "true"
55+
steps:
56+
- name: Download build artifacts
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: build-artifact
60+
path: packages
61+
- name: Set up JDK 18
62+
if: matrix.suite == 'init-java' || matrix.suite == 'cli-integ-tests'
63+
uses: actions/setup-java@v4
64+
with:
65+
java-version: "18"
66+
distribution: corretto
67+
- name: Authenticate Via OIDC Role
68+
id: creds
69+
uses: aws-actions/configure-aws-credentials@v4
70+
with:
71+
aws-region: us-east-1
72+
role-duration-seconds: 14400
73+
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME_FOR_TESTING }}
74+
role-session-name: run-tests@aws-cdk-cli-integ
75+
output-credentials: true
76+
- name: Set git identity
77+
run: |-
78+
git config --global user.name "aws-cdk-cli-integ"
79+
git config --global user.email "noreply@example.com"
80+
- name: Install Verdaccio
81+
run: npm install -g verdaccio pm2
82+
- name: Create Verdaccio config
83+
run: |-
84+
mkdir -p $HOME/.config/verdaccio
85+
echo '{"storage":"./storage","auth":{"htpasswd":{"file":"./htpasswd"}},"uplinks":{"npmjs":{"url":"https://registry.npmjs.org/"}},"packages":{"@aws-cdk/cloudformation-diff":{"access":"$all","publish":"$all","proxy":"none"},"cdk-assets":{"access":"$all","publish":"$all","proxy":"none"},"aws-cdk":{"access":"$all","publish":"$all","proxy":"none"},"@aws-cdk/cli-lib-alpha":{"access":"$all","publish":"$all","proxy":"none"},"cdk":{"access":"$all","publish":"$all","proxy":"none"},"**":{"access":"$all","proxy":"npmjs"}}}' > $HOME/.config/verdaccio/config.yaml
86+
- name: Start Verdaccio
87+
run: |-
88+
pm2 start verdaccio -- --config $HOME/.config/verdaccio/config.yaml
89+
sleep 5 # Wait for Verdaccio to start
90+
- name: Configure npm to use local registry
91+
run: |-
92+
echo '//localhost:4873/:_authToken="MWRjNDU3OTE1NTljYWUyOTFkMWJkOGUyYTIwZWMwNTI6YTgwZjkyNDE0NzgwYWQzNQ=="' > ~/.npmrc
93+
echo 'registry=http://localhost:4873/' >> ~/.npmrc
94+
- name: Find an locally publish all tarballs
95+
run: |-
96+
for pkg in packages/{@aws-cdk/cloudformation-diff,cdk-assets,aws-cdk,@aws-cdk/cli-lib-alpha,cdk}/dist/js/*.tgz; do
97+
npm publish $pkg
98+
done
99+
- name: Download and install the test artifact
100+
run: |-
101+
npm install @aws-cdk-testing/cli-integ
102+
mv ./node_modules/@aws-cdk-testing/cli-integ/* .
103+
- name: Determine latest package versions
104+
id: versions
105+
run: |-
106+
CLI_VERSION=$(cd ${TMPDIR:-/tmp} && npm view aws-cdk version)
107+
echo "CLI version: ${CLI_VERSION}"
108+
echo "cli_version=${CLI_VERSION}" >> $GITHUB_OUTPUT
109+
LIB_VERSION=$(cd ${TMPDIR:-/tmp} && npm view aws-cdk-lib version)
110+
echo "lib version: ${LIB_VERSION}"
111+
echo "lib_version=${LIB_VERSION}" >> $GITHUB_OUTPUT
112+
- name: "Run the test suite: ${{ matrix.suite }}"
113+
env:
114+
JEST_TEST_CONCURRENT: ${{ matrix.suite == 'cli-integ-tests' && 'true' || 'false' }}
115+
JSII_SILENCE_WARNING_DEPRECATED_NODE_VERSION: "true"
116+
JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION: "true"
117+
JSII_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION: "true"
118+
DOCKERHUB_DISABLED: "true"
119+
AWS_REGIONS: us-east-2,eu-west-1,eu-north-1,ap-northeast-1,ap-south-1
120+
CDK_MAJOR_VERSION: "2"
121+
RELEASE_TAG: latest
122+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123+
run: bin/run-suite --use-cli-release=${{ steps.versions.outputs.cli_version }} --framework-version=${{ steps.versions.outputs.lib_version }} ${{ matrix.suite }}
124+
strategy:
125+
fail-fast: false
126+
matrix:
127+
suite:
128+
- cli-integ-tests
129+
- init-csharp
130+
- init-fsharp
131+
- init-go
132+
- init-java
133+
- init-javascript
134+
- init-python
135+
- init-typescript-app
136+
- init-typescript-lib
137+
- tool-integrations

.github/workflows/build.yml

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

.github/workflows/pull-request-lint.yml

Lines changed: 3 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)