Skip to content

Feat/aa notifications #412

Feat/aa notifications

Feat/aa notifications #412

Workflow file for this run

# Compact Connect - Lambda JavaScript Checks
name: Check-Lambda-JS
# Controls when the action will run.
on:
# Triggers the workflow on pull requests to trunk branches involving changes to lambda javascript
pull_request:
branches:
- main
- development
- ia-web-development
- ia-development
paths:
- backend/compact-connect/lambdas/nodejs/**
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
CheckLambdas:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
# Setup Node
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '22.1.0'
# Use any cached yarn dependencies (saves build time)
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
# Install Yarn Dependencies
- name: Install JS dependencies (Cloudfront CSP Lambda)
run: yarn install
working-directory: ./backend/compact-connect/lambdas/nodejs
# Run Linter Checks
- name: Run linter (Cloudfront CSP Lambda)
run: yarn run lint
working-directory: ./backend/compact-connect/lambdas/nodejs
# Run Unit Tests
- name: Run unit tests (Cloudfront CSP Lambda)
run: yarn test
working-directory: ./backend/compact-connect/lambdas/nodejs
# Audit dependencies for vulnerabilities
- name: Audit dependencies (Cloudfront CSP Lambda)
run: yarn run audit:dependencies
working-directory: ./backend/compact-connect/lambdas/nodejs