Skip to content

Link the user-bot welcome DM to the MFA setup wizard #3

Link the user-bot welcome DM to the MFA setup wizard

Link the user-bot welcome DM to the MFA setup wizard #3

Workflow file for this run

name: Test user-bot Lambda
# Runs only when the Lambda's code or this workflow changes. Terraform changes go
# through terraform-plan.yaml instead; nothing under lambda/ is a .tf file.
on:
pull_request:
branches:
- main
paths:
- 'lambda/user-bot/**'
- '.github/workflows/user-bot-test.yml'
# No AWS credentials: the tests mock every AWS and Slack call.
permissions:
contents: read
jobs:
test:
name: Typecheck, test and build
runs-on: ubuntu-latest
defaults:
run:
working-directory: lambda/user-bot
steps:
- name: Checkout code
uses: actions/checkout@v5
# Same Node major as the Lambda runtime in terraform/user-bot.tf.
- name: Set up Node
uses: actions/setup-node@v7
with:
node-version-file: lambda/user-bot/.nvmrc
cache: npm
cache-dependency-path: lambda/user-bot/package-lock.json
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Unit tests
run: npm test
# Proves the bundle that user-bot-deploy.yml ships still builds.
- name: Build
run: npm run build