Skip to content

Commit cff2da9

Browse files
committed
Init PR CI workflow for layer
1 parent de000d1 commit cff2da9

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
lines changed

.github/workflows/pr-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
run: npm ci
3939
- name: Compile all NPM projects
4040
run: npm run compile
41+
- name: Build Lambda Layer
42+
run: npm run build-lambda
4143
- name: Unit tests (Full)
4244
run: npm run test:coverage
4345
- name: Report Coverage
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"extends": "airbnb-base",
6+
"parserOptions": {
7+
"sourceType": "script"
8+
},
9+
"rules": {
10+
"strict": ["error", "global"],
11+
"no-use-before-define": ["error", "nofunc"],
12+
"no-console": "off",
13+
"import/no-unresolved": "off",
14+
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
15+
}
16+
}

lambda-layer/sample-apps/aws-sdk/.eslintrc.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

lambda-layer/sample-apps/aws-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@
5151
"typescript": "4.9.5"
5252
},
5353
"dependencies": {
54-
"@aws-sdk/client-s3": "^3.651.1"
54+
"aws-sdk": "2.1328.0"
5555
}
5656
}

lambda-layer/sample-apps/aws-sdk/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { S3 } from '@aws-sdk/client-s3';
88

99
const s3 = new S3();
1010

11-
exports.handler = async (event: APIGatewayProxyEvent, context: Context) => {
11+
exports.handler = async (_event: APIGatewayProxyEvent, _context: Context) => {
1212
console.info('Serving lambda request.');
1313

1414
const result = await s3.listBuckets();

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"version:update": "lerna run version:update",
1616
"lint:readme": "lerna run lint:readme",
1717
"compile": "lerna run compile",
18+
"build-lambda": "./lambda-layer/build.sh",
1819
"prewatch": "npm run precompile",
1920
"test": "lerna run test",
2021
"test:coverage": "lerna run test:coverage",

0 commit comments

Comments
 (0)