Repository navigation
Link the user-bot welcome DM to the MFA setup wizard #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |