test workflow

This commit is contained in:
neil 2022-10-18 12:36:26 +08:00
parent 54d21009f6
commit 7119323f73
3 changed files with 12 additions and 8 deletions

View file

@ -6,6 +6,7 @@ concurrency:
env:
TEA_SECRET: ${{ secrets.TEA_SECRET }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
jobs:
deploy_sls:

View file

@ -17,6 +17,9 @@ const serverlessConfiguration: AWS = {
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',
NODE_OPTIONS: '--enable-source-maps --stack-trace-limit=1000',
},
iam: {
deploymentRole: `arn:aws:iam::${process.env.AWS_ACCOUNT_ID || '640264234305'}:role/CloudFormationExecutionRole`
}
},
// import the function via paths
functions: { hello },

View file

@ -1,18 +1,18 @@
import schema from './schema';
// import schema from './schema';
import { handlerPath } from '@libs/handler-resolver';
export default {
handler: `${handlerPath(__dirname)}/handler.main`,
events: [
{
http: {
httpApi: {
method: 'post',
path: 'hello',
request: {
schemas: {
'application/json': schema,
},
},
path: '/hello',
// request: {
// schemas: {
// 'application/json': schema,
// },
// },
},
},
],