Skip to content

Skip handling of container image lambda functions #343

Skip handling of container image lambda functions

Skip handling of container image lambda functions #343

name: build_serverless
on: [push, pull_request]
jobs:
check-formatting:
defaults:
run:
working-directory: serverless
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Check formatting
run: yarn check-formatting
cloudformation-linter:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Cloud Formation Linter with Latest Version
uses: scottbrenner/cfn-lint-action@v2
- name: Print the Cloud Formation Linter Version & run Linter.
run: |
cfn-lint --version
cfn-lint -t ./serverless/template.yml
check-typescript-build:
defaults:
run:
working-directory: serverless
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
test:
defaults:
run:
working-directory: serverless
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test
- name: Upload code coverage report
run: bash <(curl -s https://codecov.io/bash)