Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add e2e testing #293

Merged
merged 21 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ jobs:
cache: npm
- run: npm install
- run: npm test
- run: npm run test:e2e
- run: npm run build --if-present
26 changes: 26 additions & 0 deletions e2e/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
test-e2e: test-e2e-minimal test-e2e-individually test-e2e-complete
samchungy marked this conversation as resolved.
Show resolved Hide resolved

build:
npm run build
npm link

test-e2e-minimal: build
rm -fr ./e2e/minimal && mkdir ./e2e/minimal && rsync -r ./examples/minimal/ ./e2e/minimal/
cd ./e2e/minimal && npm i && npm link serverless-esbuild && npx sls package
samchungy marked this conversation as resolved.
Show resolved Hide resolved
cd ./e2e/minimal/.serverless && unzip minimal-example.zip
npx jest -c jest.config.e2e.js --ci ./e2e/minimal.test.ts
rm -fr ./e2e/minimal

test-e2e-individually: build
rm -fr ./e2e/individually && mkdir ./e2e/individually && rsync -r ./examples/individually/ ./e2e/individually/
cd ./e2e/individually && npm i && npm link serverless-esbuild && npx sls package
cd ./e2e/individually/.serverless && unzip hello1.zip && unzip hello2.zip
npx jest -c jest.config.e2e.js --ci ./e2e/individually.test.ts
rm -fr ./e2e/individually

test-e2e-complete: build
rm -fr ./e2e/complete && mkdir ./e2e/complete && rsync -r ./examples/complete/ ./e2e/complete/
cd ./e2e/complete && npm i && npm link serverless-esbuild && npx sls package
cd ./e2e/complete/.serverless && unzip complete-example.zip
npx jest -c jest.config.e2e.js --ci ./e2e/complete.test.ts
rm -fr ./e2e/complete
Loading