feat: add Agentforce Service Agent #47
This file contains 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
# Unique name for this workflow | |
name: CI on PR | |
# Definition when the workflow should run | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
# Jobs to be executed | |
jobs: | |
# Formatting and linting | |
format-lint-lwc-tests: | |
runs-on: trailheadapps-Ubuntu | |
steps: | |
# Checkout the source code | |
- name: 'Checkout source code' | |
uses: actions/checkout@v4 | |
# Install Volta to enforce proper node and package manager versions | |
- name: 'Install Volta' | |
uses: volta-cli/[email protected] | |
# Cache node_modules to speed up the process | |
- name: 'Restore node_modules cache' | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
npm-${{ env.cache-name }}- | |
npm- | |
# Install npm dependencies for Prettier and Jest | |
- name: 'Install npm dependencies' | |
if: steps.cache-npm.outputs.cache-hit != 'true' | |
run: HUSKY=0 npm ci | |
# Prettier formatting | |
- name: 'Code formatting verification with Prettier' | |
run: npm run prettier:verify | |
# Lint LWC / Aura | |
- name: 'Lint Lightning Web Components / Aura Components' | |
run: npm run lint | |
# LWC unit tests | |
- name: 'Unit test Lightning Web Components' | |
run: npm run test:unit |