File tree Expand file tree Collapse file tree 5 files changed +316
-406
lines changed
Expand file tree Collapse file tree 5 files changed +316
-406
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,24 @@ jobs:
145145 - *node-checkout
146146 - *node-setup
147147 - *node-install-dependencies
148+ - &next-cache
149+ name : Cache Next.js build artifacts
150+ uses : actions/cache@v4
151+ with :
152+ path : .next/cache
153+ key : ${{ runner.os }}-next-cache-${{ hashFiles('package-lock.json') }}
154+ restore-keys : |
155+ ${{ runner.os }}-next-cache-
148156 - ©-example-env
149157 name : Copy .env.example to .env
150158 run : cp .env.example .env
151159
152160 - name : Seed database
153161 run : npm run seed
154162
163+ - name : Build application
164+ run : npm run build
165+
155166 - name : Run Playwright tests
156167 run : npm run test:e2e
157168
@@ -174,6 +185,7 @@ jobs:
174185 - *node-checkout
175186 - *node-setup
176187 - *node-install-dependencies
188+ - *next-cache
177189 - *copy-example-env
178190 - name : Build and package Lambda function
179191 run : npm run build:lambda
Original file line number Diff line number Diff line change @@ -188,17 +188,20 @@ module "dns_records" {
188188 source = " terraform-aws-modules/route53/aws"
189189 version = " 6.1.0"
190190
191- create_zone = false
192- name = var. parent_domain
191+ create = true
192+ create_zone = false
193+ name = data. aws_route53_zone . zone . name
194+ private_zone = false
193195
194196 records = {
195197 app_a = {
196198 full_name = var.app_domain
197199 type = " A"
198200 allow_overwrite = true
199201 alias = {
200- name = module.cdn.cloudfront_distribution_domain_name
201- zone_id = module.cdn.cloudfront_distribution_hosted_zone_id
202+ name = module.cdn.cloudfront_distribution_domain_name
203+ zone_id = module.cdn.cloudfront_distribution_hosted_zone_id
204+ evaluate_target_health = false
202205 }
203206 }
204207
@@ -207,8 +210,9 @@ module "dns_records" {
207210 type = " AAAA"
208211 allow_overwrite = true
209212 alias = {
210- name = module.cdn.cloudfront_distribution_domain_name
211- zone_id = module.cdn.cloudfront_distribution_hosted_zone_id
213+ name = module.cdn.cloudfront_distribution_domain_name
214+ zone_id = module.cdn.cloudfront_distribution_hosted_zone_id
215+ evaluate_target_health = false
212216 }
213217 }
214218 }
Original file line number Diff line number Diff line change 11import "dotenv/config" ;
22import { defineConfig , devices } from "@playwright/test" ;
33
4- const PORT = process . env . PORT ?? "3000" ;
5- const HOST = process . env . HOST ?? "127.0.0.1" ;
6- const baseURL = process . env . PLAYWRIGHT_BASE_URL ?? `http://${ HOST } :${ PORT } ` ;
4+ const BASE_URL = "http://localhost:3000" ;
75
86export default defineConfig ( {
97 testDir : "./tests/e2e" ,
@@ -26,7 +24,7 @@ export default defineConfig({
2624 ] ,
2725 ] ,
2826 use : {
29- baseURL,
27+ baseURL : BASE_URL ,
3028 trace : "retain-on-failure" ,
3129 screenshot : "only-on-failure" ,
3230 video : "retain-on-failure" ,
@@ -38,9 +36,9 @@ export default defineConfig({
3836 } ,
3937 ] ,
4038 webServer : {
41- command : ` npm run dev -- --hostname ${ HOST } --port ${ PORT } ` ,
42- url : baseURL ,
39+ command : " npm run start" ,
40+ url : BASE_URL ,
4341 reuseExistingServer : ! process . env . CI ,
44- timeout : 120_000 ,
42+ timeout : 10_000 ,
4543 } ,
4644} ) ;
You can’t perform that action at this time.
0 commit comments