Skip to content

Commit cf2f0fd

Browse files
committed
Merge branch 'main' into release
2 parents 69f04c6 + a1b7b5b commit cf2f0fd

File tree

222 files changed

+25358
-1174
lines changed

Some content is hidden

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

222 files changed

+25358
-1174
lines changed

.github/workflows/CI.yml

+56-61
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ env:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16-
container: registry.gitlab.com/dealmore/dealmore-build-images/lambda:nodejs14.x
16+
container: public.ecr.aws/sam/build-nodejs14.x:latest
1717

1818
steps:
19+
- name: Install yarn
20+
run: npm install --global [email protected]
21+
1922
- uses: actions/checkout@v2
2023

2124
- name: Cache
@@ -37,31 +40,48 @@ jobs:
3740
with:
3841
name: dist
3942
path: |
40-
packages/runtime/dist/
41-
packages/tf-next/dist/
42-
packages/proxy/dist/
43-
packages/proxy/dist.zip
43+
packages/api/dist/
44+
packages/api/dist.zip
45+
packages/deploy-controller/dist/
46+
packages/deploy-controller/dist.zip
4447
packages/deploy-trigger/dist/
4548
packages/deploy-trigger/dist.zip
49+
packages/proxy/dist/
50+
packages/proxy/dist.zip
51+
packages/proxy-config/dist/
52+
packages/proxy-config/dist.zip
53+
packages/runtime/dist/
54+
packages/tf-next/dist/
4655
if-no-files-found: error
4756

4857
test-integration:
4958
needs: build
5059
runs-on: ubuntu-latest
51-
container: registry.gitlab.com/dealmore/dealmore-build-images/lambda:nodejs14.x
60+
container: public.ecr.aws/sam/build-nodejs14.x:latest
5261
services:
5362
s3:
5463
image: registry.gitlab.com/dealmore/dealmore-build-images:s3-emulator
5564
env:
5665
MINIO_ACCESS_KEY: test
5766
MINIO_SECRET_KEY: testtest
67+
dynamodb:
68+
image: amazon/dynamodb-local:latest
69+
# @note Github overwrites WORKDIR to repository path, so overwrite that again
70+
options: >-
71+
--workdir /home/dynamodblocal
5872
5973
env:
74+
# Increase heap size for running the tests
75+
NODE_OPTIONS: '--max_old_space_size=4096'
6076
MINIO_ACCESS_KEY: test
6177
MINIO_SECRET_KEY: testtest
6278
S3_ENDPOINT: s3:9000
79+
TEST_DYNAMO_ENDPOINT: http://dynamodb:8000
6380

6481
steps:
82+
- name: Install yarn
83+
run: npm install --global [email protected]
84+
6585
- uses: actions/checkout@v2
6686

6787
- name: Cache
@@ -72,7 +92,7 @@ jobs:
7292
**/node_modules
7393
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7494

75-
- name: Yarn install
95+
- name: Install dependencies
7696
run: yarn --frozen-lockfile --cache-folder .yarn
7797

7898
- name: Download build artifacts
@@ -82,13 +102,19 @@ jobs:
82102
path: packages
83103

84104
- name: Jest
85-
run: yarn test
105+
run: yarn test:not:runtime
86106

87-
test-e2e-prepare:
107+
# We run the runtime tests in a dedicated task since running it with the
108+
# other integration tests would cause a memory overflow.
109+
test-integration-runtime:
88110
needs: build
89111
runs-on: ubuntu-latest
90-
container: registry.gitlab.com/dealmore/dealmore-build-images/lambda:nodejs14.x
112+
container: public.ecr.aws/sam/build-nodejs14.x:latest
113+
91114
steps:
115+
- name: Install yarn
116+
run: npm install --global [email protected]
117+
92118
- uses: actions/checkout@v2
93119

94120
- name: Cache
@@ -99,7 +125,7 @@ jobs:
99125
**/node_modules
100126
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
101127

102-
- name: Yarn install
128+
- name: Install dependencies
103129
run: yarn --frozen-lockfile --cache-folder .yarn
104130

105131
- name: Download build artifacts
@@ -108,41 +134,16 @@ jobs:
108134
name: dist
109135
path: packages
110136

111-
- name: Build e2e fixtures
112-
run: yarn test:e2e:prepare
113-
114-
- name: Upload e2e fixtures
115-
uses: actions/upload-artifact@v2
116-
with:
117-
name: e2e-fixtures
118-
path: test/fixtures/**/.next-tf/**/*
119-
if-no-files-found: error
137+
- name: Jest
138+
run: yarn test:runtime
120139

121-
test-e2e:
122-
needs: [build, test-e2e-prepare]
140+
test-e2e-prepare:
141+
needs: build
123142
runs-on: ubuntu-latest
124-
services:
125-
s3:
126-
image: registry.gitlab.com/dealmore/dealmore-build-images:s3-emulator
127-
env:
128-
MINIO_ACCESS_KEY: test
129-
MINIO_SECRET_KEY: testtest
130-
ports:
131-
- 9000:9000
132-
env:
133-
SAM_CLI_TELEMETRY: 0
134-
# Don't worry these are fake AWS credentials for AWS SAM
135-
AWS_ACCESS_KEY_ID: ABIAZLJNBT8I3KFOU4NO
136-
AWS_SECRET_ACCESS_KEY: 4Xt3Rbx4DO21MhK1IHXZXRvVRDuqaQ0Wo5lILA/h
137-
MINIO_ACCESS_KEY: test
138-
MINIO_SECRET_KEY: testtest
139-
143+
container: public.ecr.aws/sam/build-nodejs14.x:latest
140144
steps:
141-
- name: Setup AWS SAM
142-
run: |
143-
brew tap aws/tap
144-
brew install aws-sam-cli
145-
sam --version
145+
- name: Install yarn
146+
run: npm install --global [email protected]
146147

147148
- uses: actions/checkout@v2
148149

@@ -152,37 +153,31 @@ jobs:
152153
path: |
153154
.yarn
154155
**/node_modules
155-
key: ${{ runner.os }}-e2e-${{ hashFiles('yarn.lock') }}
156+
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
157+
158+
- name: Yarn install
159+
run: yarn --frozen-lockfile --cache-folder .yarn
156160

157161
- name: Download build artifacts
158162
uses: actions/download-artifact@v2
159163
with:
160164
name: dist
161165
path: packages
162166

163-
- name: Download prebuilt e2e fixtures
164-
uses: actions/download-artifact@v2
167+
- name: Build e2e fixtures
168+
run: yarn test:e2e:prepare
169+
170+
- name: Upload e2e fixtures
171+
uses: actions/upload-artifact@v2
165172
with:
166173
name: e2e-fixtures
167-
path: test/fixtures
168-
169-
- name: Install dependencies
170-
run: yarn --frozen-lockfile --cache-folder .yarn
171-
172-
- name: Run e2e-test
173-
run: yarn test:e2e --runInBand
174-
175-
- name: Output SAM logs
176-
run: |
177-
printf "\n\nOutput of sam-local.log:\n"
178-
cat sam-local.log
179-
printf "\n\nOutput of sam-api.log:\n"
180-
cat sam-api.log
174+
path: test/fixtures/**/.next-tf/**/*
175+
if-no-files-found: error
181176

182177
publishRelease:
183178
name: Potentially publish release
184179
runs-on: ubuntu-latest
185-
needs: [build, test-integration, test-e2e]
180+
needs: [build, test-integration, test-integration-runtime]
186181
if: github.ref == 'refs/heads/main'
187182
env:
188183
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## [Unreleased]
44

5+
## [1.0.0-canary.2] - 2022-05-31
6+
7+
- Adds static prefix to files served from S3 ([#321](https://github.com/milliHQ/terraform-aws-next-js/pull/321))
8+
- Add CLI commands ([#317](https://github.com/milliHQ/terraform-aws-next-js/pull/317))
9+
- No longer require reserved concurrency ([#319](https://github.com/milliHQ/terraform-aws-next-js/pull/319), [#251](https://github.com/milliHQ/terraform-aws-next-js/issues/251))
10+
- Use CLI and CDK for deployments ([#300](https://github.com/milliHQ/terraform-aws-next-js/pull/300))
11+
512
## [0.12.2] - 2022-04-16
613

714
- Append querystring to redirects ([#296](https://github.com/milliHQ/terraform-aws-next-js/issues/296), [#304](https://github.com/milliHQ/terraform-aws-next-js/pull/304))

0 commit comments

Comments
 (0)