Skip to content

Commit ab161ec

Browse files
committed
Test commit for deploying to staging
1 parent a8f023d commit ab161ec

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/deploy-staging.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,17 @@ jobs:
2626
${{ runner.os }}-build-${{ env.cache-name }}-
2727
${{ runner.os }}-build-
2828
${{ runner.os }}-
29-
3029
- name: Install dependencies
3130
run: npm ci
32-
3331
- name: 'Deploy and test Staging'
3432
env:
3533
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3634
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3735
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
3836
run: |
37+
npm ci
3938
cd services
40-
for DIR in *; do (cd $DIR && npx sls deploy --stage staging --conceal && cd ..) & done; wait
39+
for DIR in *; do (cd $DIR && npx serverless deploy --stage staging && cd ..) & done; wait
4140
echo "Finished deployment in staging"
42-
for DIR in *; do (cd $DIR && npx sls invoke test --compilers js:babel-core/register --stage staging && cd ..) & done; wait
41+
for DIR in *; do (cd $DIR && npx serverless invoke test --compilers js:babel-core/register --stage staging && cd ..) & done; wait
4342
echo "Finished running tests in staging environment"

deploy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd services
2+
for DIR in *; do (cd $DIR && npx sls deploy --stage staging && cd ..) & done; wait

services/hello/test/hello.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// tests for hello
44
// Generated by serverless-mocha-plugin
55

6+
67
import mochaPlugin from 'serverless-mocha-plugin';
78
const expect = mochaPlugin.chai.expect;
89
const wrapped = mochaPlugin.getWrapper('hello', '/handler.js', 'hello');

0 commit comments

Comments
 (0)