Skip to content

Commit 1af4a24

Browse files
committed
ci: refactor e2e buildspec
1 parent 27ac657 commit 1af4a24

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

buildspec-e2e.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ phases:
66
nodejs: 20
77
commands:
88
- npm i -g pnpm
9-
- export COMMIT_SHA=$(cat meta.json | jq -r '.sha')
9+
- # export COMMIT_SHA=$(cat meta.json | jq -r '.sha')
10+
- export COMMIT_SHA=$(git rev-parse HEAD)
1011
- echo $COMMIT_SHA
1112
- echo $CODEBUILD_BUILD_ID
1213
- echo $CODEBUILD_PUBLIC_BUILD_URL
@@ -20,16 +21,17 @@ phases:
2021
- ls -lah
2122
- pulumi version
2223
- pnpm install
23-
- pnpm -C website install && pnpm -C website build
24-
- cd tests && pnpm install && npx playwright install --with-deps && cd ..
25-
- cd infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
26-
- cd infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
27-
- cd infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd ../
24+
- pnpm build
25+
- cp -r dist e2e
26+
- pnpm -C e2e/website install && pnpm -C website build
27+
- cd e2e/tests && pnpm install && npx playwright install --with-deps && cd -
28+
- cd e2e/infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
29+
- cd e2e/infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
30+
- cd e2e/infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd -
2831
build:
2932
commands:
3033
- ls -a
31-
- cd tests && pnpm test
34+
- cd e2e/tests && pnpm test && cd -
3235
finally:
33-
- cd ../
3436
- echo $COMMIT_SHA
35-
- cd infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd ../
37+
- cd e2e/infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd -

0 commit comments

Comments
 (0)